Skip to content

Commit

Permalink
Fix auto-merge CI to correctly wait for linting. (#16781)
Browse files Browse the repository at this point in the history
Otherwise if you hit the `Enable auto-merge` button and the linting
fails the PR is still aut-merged.
  • Loading branch information
erikjohnston committed Jan 10, 2024
1 parent 8189942 commit 72e9b74
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,26 @@ jobs:
- check-schema-delta
- check-lockfile
- lint-clippy
- lint-clippy-nightly
- lint-rustfmt
runs-on: ubuntu-latest
steps:
- run: "true"
- uses: matrix-org/done-action@v2
with:
needs: ${{ toJSON(needs) }}

# Various bits are skipped if there was no applicable changes.
skippable: |
check-sampleconfig
check-schema-delta
lint
lint-mypy
lint-newsfile
lint-pydantic
lint-clippy
lint-clippy-nightly
lint-rustfmt
calculate-test-jobs:
if: ${{ !cancelled() && !failure() }} # Allow previous steps to be skipped, but not fail
Expand Down Expand Up @@ -695,6 +711,7 @@ jobs:
- complement
- cargo-test
- cargo-bench
- linting-done
runs-on: ubuntu-latest
steps:
- uses: matrix-org/done-action@v2
Expand Down
1 change: 1 addition & 0 deletions changelog.d/16781.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure CI fails when linting fails to make sure auto-merge does the correct thing.

0 comments on commit 72e9b74

Please sign in to comment.