diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 52d79d7b98..834ac0fac6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -39,19 +39,7 @@ jobs: # Full history so `just ci check` can diff against origin/$GITHUB_BASE_REF. fetch-depth: 0 - # Quests, agent config, and root Markdown compile nothing, so a diff of only - # those skips the disk cleanup and Rust cache that exist for the build. - - name: Scope - id: scope - run: | - base=$(git merge-base "origin/$GITHUB_BASE_REF" HEAD) - files=$(git diff --name-only "$base") - if grep -qvE '^(quest/|\.claude/|[^/]+\.md$)' <<< "$files"; then - echo build=true >> "$GITHUB_OUTPUT" - fi - - name: Free disk space - if: steps.scope.outputs.build uses: jlumbroso/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # main with: tool-cache: false @@ -75,12 +63,14 @@ jobs: # scope such an entry to the PR's own branch anyway, where no later PR # could read it while it ate the repository's 10 GB budget. - name: Rust cache - if: steps.scope.outputs.build uses: ./.github/actions/rust-cache # The same recipe a developer runs locally. It diffs against # origin/$GITHUB_BASE_REF and touches only the packages this PR changed - # plus their dependents, so a one-crate PR compiles one crate. + # plus their dependents, so a one-crate PR compiles one crate and a + # quest-only PR runs only the lints. sh/dispatch.sh's impact map is the one + # place that decides; the setup above always runs rather than keep a second + # path map here. # # MOQ_STRICT turns every "tool missing, skipping" guard into an error. # Locally an absent formatter means less gets checked; here it would mean @@ -105,26 +95,12 @@ jobs: # Full history so `just ci test` can diff against origin/$GITHUB_BASE_REF. fetch-depth: 0 - # Same scope as the `check` job. No test covers those files either, so the - # job skips everything and reports green instead of spending a minute of - # setup to run nothing. - - name: Scope - id: scope - run: | - base=$(git merge-base "origin/$GITHUB_BASE_REF" HEAD) - files=$(git diff --name-only "$base") - if grep -qvE '^(quest/|\.claude/|[^/]+\.md$)' <<< "$files"; then - echo build=true >> "$GITHUB_OUTPUT" - fi - - name: Free disk space - if: steps.scope.outputs.build uses: jlumbroso/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # main with: tool-cache: false - - if: steps.scope.outputs.build - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main + - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main with: determinate: false # Trust the flake's cachix substituter. `nixConfig` in flake.nix is @@ -139,13 +115,11 @@ jobs: # Restore only, same as the `check` job above. - name: Rust cache - if: steps.scope.outputs.build uses: ./.github/actions/rust-cache # NEXTEST_PROFILE picks up the longer hang timeout in .config/nextest.toml; # without it a runner under load could trip the local one. - name: Test - if: steps.scope.outputs.build run: nix develop --command just ci test env: MOQ_STRICT: 1 diff --git a/quest/m1/tooling/README.md b/quest/m1/tooling/README.md index 0d62a6a3b0..4f2ba09967 100644 --- a/quest/m1/tooling/README.md +++ b/quest/m1/tooling/README.md @@ -1,4 +1,4 @@ -# Tooling: thin justfiles and CI that calls them +# [S] Tooling: thin justfiles and CI that calls them ## Goal @@ -20,7 +20,3 @@ self-inflicted: logic inside recipes. A recipe that runs a short fixed sequence of commands is thin and stays inline; line count is not the test. - -## Required - -- [Check scope](/quest/m1/tooling/check-scope.md) - check.yml's build-or-skip decision comes from sh/dispatch.sh instead of an inline diff grep diff --git a/quest/m1/tooling/check-scope.md b/quest/m1/tooling/check-scope.md deleted file mode 100644 index 0b92cec0b9..0000000000 --- a/quest/m1/tooling/check-scope.md +++ /dev/null @@ -1,9 +0,0 @@ -# [S] check.yml scopes from the impact map - -## Goal - -`.github/workflows/check.yml` decides whether a PR needs the build and test jobs from `sh/dispatch.sh`, the line's single impact map. The two inline "Scope" steps that grep the diff for quest-only and doc-only changes go away, so there is one place that maps changed paths to work. - -## Plan - -Main's #4407 added the inline Scope steps (a quest, `.claude/`, or root-markdown-only diff skips the build) after this line had already moved CI scoping into `sh/dispatch.sh`. Teach the impact map that those paths need no build, have the Scope steps call it (or drop them if the dispatcher already makes the jobs no-ops), and keep the skipped-but-required checks reporting success so branch protection still passes on quest-only PRs. `just gh check` must keep enforcing that workflow steps run recipes.