diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 650ef8e5..172498f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,28 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + # `cargo check` runs standalone/src-tauri/build.rs, which fails the build + # unless the Node.js on PATH exactly matches package.json's + # devEngines.runtime.version pin. A bare `node-version: 22` tracks whatever + # 22.x the runner image ships, so a runner Node bump (e.g. 22.22.3 → + # 22.23.0) breaks the smoketest even though the pin is unchanged. Drive + # setup-node from the pin so the exact version is provisioned, mirroring + # release.yml's build-standalone job. + - name: Read pinned Node.js version + id: node-pin + shell: bash + run: | + set -euo pipefail + version=$(jq -r '.devEngines.runtime.version' package.json) + if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "ERROR: package.json devEngines.runtime.version is not MAJOR.MINOR.PATCH, got: '$version'" >&2 + exit 1 + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 22 + node-version: ${{ steps.node-pin.outputs.version }} - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 with: