Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure CI for merge queue #818

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name: CI
on:
push:
branches:
- master
- auto
- try
merge_group:
pull_request:
branches:
- "**"

jobs:
test:
Expand Down Expand Up @@ -111,22 +105,15 @@ jobs:
- name: Build Chalk book
run: cd book && ./mdbook build

end-success:
name: bors build finished
if: success()
runs-on: ubuntu-latest
conclusion:
needs: [test, fmt]

steps:
- name: Mark the job as successful
run: exit 0

end-failure:
name: bors build finished
if: "!success()"
# !cancelled() executes the job regardless of whether the previous jobs passed, failed or get skipped.
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: [test, fmt]

steps:
- name: Mark the job as a failure
run: exit 1
- name: Conclusion
run: |
# Print the dependent jobs to see them in the CI log
jq -C <<< '${{ toJson(needs) }}'
# Check if all jobs that we depend on (in the needs array) were successful.
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
Loading