Skip to content

Test each commit once, cache dependencies and lock down the workflows - #321

Merged
ericmj merged 1 commit into
mainfrom
ci-tuning
Oct 15, 2026
Merged

ericmj merged 1 commit into
mainfrom
ci-tuning

Conversation

@ericmj

@ericmj ericmj commented Oct 15, 2026

Copy link
Copy Markdown
Member

A pull request from a branch in this repository ran the test job for the commit its branch push had already tested, 18 times from 2026-09-16 to 2026-10-15. The test job now runs for pushes and for pull requests from forks, like the Docker job.

The test job compiled every dependency twice without a cache: in dev for "Install dependencies" (43 s) and again in test (42 s) in https://github.com/hexpm/bob/actions/runs/38720616242/job/116373970304. It now runs in the test environment only and caches deps and _build, written only from main, as with the Docker build.

bob's production database is on Postgres 18, so the service container is too.

Actions are pinned to commit SHAs, the token is read-only unless a job asks for more (the repository default is write), checkouts don't keep credentials, and CodeQL and zizmor check the workflows as in hexpm. Jobs have timeouts instead of GitHub's 360-minute default.

The Docker build compiles dependencies across OS processes, installs esbuild and tailwind in a cached layer instead of downloading them in assets.deploy on every build, and removes the apt lists from the image. The Docker job doesn't check out the repository: build-push-action builds from the commit's Git URL.

A pull request from a branch in this repository ran the test job for the
commit its branch push had already tested, 18 times from 2026-09-16 to
2026-10-15. The test job now runs for pushes and for pull requests from
forks, like the Docker job.

The test job compiled every dependency twice without a cache: in dev for
"Install dependencies" (43 s) and again in test (42 s) in
https://github.com/hexpm/bob/actions/runs/38720616242/job/116373970304. It
now runs in the test environment only and caches deps and _build, written
only from main, as with the Docker build.

bob's production database is on Postgres 18, so the service container is
too.

Actions are pinned to commit SHAs, the token is read-only unless a job asks
for more (the repository default is write), checkouts don't keep
credentials, and CodeQL and zizmor check the workflows as in hexpm. Jobs
have timeouts instead of GitHub's 360-minute default.

The Docker build compiles dependencies across OS processes, installs
esbuild and tailwind in a cached layer instead of downloading them in
assets.deploy on every build, and removes the apt lists from the image. The
Docker job doesn't check out the repository: build-push-action builds from
the commit's Git URL.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@ericmj
ericmj marked this pull request as ready for review October 15, 2026 21:15
@ericmj
ericmj merged commit 26f5e24 into main Oct 15, 2026
8 checks passed
@ericmj
ericmj deleted the ci-tuning branch October 15, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants