Skip to content

Commit 26f762d

Browse files
committed
ci: start the Rust test build before the JS-only setup
The Rust test build (`nix build .#ccusage-tests`) does not depend on the JS toolchain, so move its background step ahead of the JS-only setup (toolchain install, pnpm install, fixture dirs). It now overlaps that setup alongside `nix flake check` instead of starting only after it, with the Node tests joining via `wait-all`.
1 parent 8396440 commit 26f762d

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,31 @@ jobs:
3636
ref: ${{ github.event.pull_request.head.sha || github.sha }}
3737
persist-credentials: false
3838
- uses: ./.github/actions/setup-nix-cache
39-
# `nix flake check` only needs the checkout and Nix, so kick it off in the
40-
# background right away. It then overlaps the JS toolchain install and the
41-
# test runs below instead of occupying a separate runner with its own
42-
# checkout and Nix cache restore.
39+
# `nix flake check` and the Rust test build (`nix build .#ccusage-tests`)
40+
# only need the checkout and Nix — neither touches the JS toolchain — so
41+
# start both as background steps right away. They run concurrently while
42+
# the JS-only setup (toolchain install + pnpm install) happens below, and
43+
# the Node tests join them afterwards via `wait-all`.
44+
# https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/
4345
- name: Run nix flake check
4446
background: true
4547
run: nix flake check --print-build-logs
46-
# Node tests need the JS toolchain; the Rust tests run via `nix build`. Install
47-
# just pnpm/node/just instead of realizing the full dev shell, which drags
48-
# in every linter, formatter, and the pre-commit hook closure and dominated
49-
# this job's wall time.
48+
- name: Run Rust tests
49+
background: true
50+
run: nix build .#ccusage-tests --print-build-logs
51+
# Node tests need the JS toolchain. Install just pnpm/node/just instead of
52+
# realizing the full dev shell, which drags in every linter, formatter, and
53+
# the pre-commit hook closure and dominated this job's wall time.
5054
- name: Install JS tooling
5155
run: nix profile install --inputs-from . nixpkgs#pnpm nixpkgs#nodejs nixpkgs#just
5256
- run: pnpm install --frozen-lockfile
5357
- name: Create default Claude directories for tests
5458
run: |
5559
mkdir -p "$HOME/.claude/projects"
5660
mkdir -p "$HOME/.config/claude/projects"
57-
# The Node tests (`just test-node`, mostly single-threaded) and the Rust
58-
# test build (`nix build`, CPU-heavy) are independent and have different
59-
# resource profiles, so run them as concurrent background steps and join
60-
# with `wait-all`. This overlaps them instead of paying their wall time
61-
# back-to-back on the same runner.
62-
# https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/
6361
- name: Run Node tests
6462
background: true
6563
run: just test-node
66-
- name: Run Rust tests
67-
background: true
68-
run: nix build .#ccusage-tests --print-build-logs
6964
- wait-all:
7065

7166
build-native-packages:

0 commit comments

Comments
 (0)