Guides · Checked on 28 November 2026
How do I speed up GitHub Actions?
Find the last required check to finish, then trace it back through the workflow graph. If tests are waiting for lint and neither needs the other, run them side by side. If tests already start immediately, look at their slowest step instead.
Run independent checks in parallel
Open a completed run. Follow the arrows into the last required check. A job can be short and still finish last because it started late.
Keep each
needsdependency that enforces a gate or passes an output. In a Go module,go vetandgo testcan inspect the same commit independently. This matrix gives each its own job.
Tested on 28 November 2026
Test and vet started one second apart on two checklane-2vcpu runners. Both passed; 11 seconds elapsed from the first job starting to the last job finishing.
Show the workflow YAML
name: Parallel Go checks
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
check:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: checklane-2vcpu
strategy:
fail-fast: false
matrix:
command: [vet, test]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
with:
go-version-file: go.mod
cache: false
- run: go ${{ matrix.command }} ./...
Compare elapsed time from the start of the run to the last required check, not the sum of the job durations. If the new jobs replace a required check, update the branch rule before relying on the new names.
On our own CI, the median PR run took 3 min 19 s. We measured 303 successful first attempts over eight days (20–28 November 2026 UTC), from workflow start to the last job finishing.
Related guide: How do I cache pnpm in GitHub Actions?
Frequently asked questions
Where can I see how long each job ran?
Open the workflow run in the Actions tab. The job summary shows execution time for each job, so you can see whether the long run came from tests, lint or the build.
GitHub: viewing job execution timeWhy do my matrix jobs run two at a time?
Check strategy.max-parallel. A value of 2 lets only two jobs from that matrix run at once, even when more runners are available.
GitHub: limiting parallel matrix jobsCan I reuse a dependency cache after the lockfile changes?
Yes. With actions/cache, set a restore-keys prefix shared by older lockfile keys. On a partial match, the action restores the most recent matching cache. Run the install step to fetch anything missing.
GitHub: cache key matchingRun this job on Checklane
When the tests themselves take most of the time, compare the same job at the same cache state on two runner sizes.
Connect your repository, then set the job’s runner label:
runs-on: checklane