mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
ci: fail jobs that dirty the worktree (#29720)
## Why CI jobs should not silently leave tracked changes or untracked files in the repository worktree. ## What - Add a shared final worktree-cleanliness action to 19 checkout-bearing PR and main CI jobs. - Ignore the intentional SDK scratch directory and nested V8 checkout. - Pin Bazelisk in shared CI setup so `.bazelversion` remains authoritative, avoiding `MODULE.bazel.lock` deltas on Windows runners. - Leave `rust-ci-full` and release-only workflows unchanged. - Update `AGENTS.md` to discourage review bots from asking for `MODULE.bazel.lock` changes.
This commit is contained in:
@@ -58,6 +58,10 @@ jobs:
|
||||
echo "codex=$codex" >> "$GITHUB_OUTPUT"
|
||||
echo "workflows=$workflows" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
# --- Fast Cargo-native PR checks -------------------------------------------
|
||||
general:
|
||||
name: Format / etc
|
||||
@@ -83,6 +87,10 @@ jobs:
|
||||
- name: Rust benchmark smoke test
|
||||
run: just bench-smoke
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
cargo_shear:
|
||||
name: cargo shear
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -103,6 +111,10 @@ jobs:
|
||||
- name: cargo shear
|
||||
run: cargo shear --deny-warnings
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
argument_comment_lint_package:
|
||||
name: Argument comment lint package
|
||||
runs-on: ubuntu-24.04
|
||||
@@ -154,6 +166,10 @@ jobs:
|
||||
env:
|
||||
RUST_MIN_STACK: "8388608" # 8 MiB
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled()
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
argument_comment_lint_prebuilt:
|
||||
name: Argument comment lint - ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.runs_on || matrix.runner }}
|
||||
@@ -205,6 +221,10 @@ jobs:
|
||||
target: ${{ runner.os }}
|
||||
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
|
||||
|
||||
- name: Check for a clean worktree
|
||||
if: always() && !cancelled() && steps.argument_comment_lint_gate.outputs.run == 'true'
|
||||
uses: ./.github/actions/check-clean-worktree
|
||||
|
||||
# --- Gatherer job that you mark as the ONLY required status -----------------
|
||||
results:
|
||||
name: CI results (required)
|
||||
|
||||
Reference in New Issue
Block a user