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

Mark CI jobs as required #604

Merged
merged 4 commits into from Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -190,3 +190,31 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./lcov.info"

validate-success:
needs:
["coverage-send"]
runs-on: ubuntu-latest
outputs:
success: ${{ steps.set-output.outputs.success }}
steps:
- id: set-output
run: echo "success=true" >> $GITHUB_OUTPUT

notify-success:
name: CI pipeline succeeded
needs: ["validate-success"]
if: always() # Always run, so we never skip this required check
runs-on: ubuntu-latest
steps:
- name: Note Pipeline Passed
run: |
msgPrefix="Pipeline #${{ github.run_id }} finished"
passed="${{ needs.validate-success.outputs.success }}"
if [[ "$passed" == "true" ]]; then
echo "${msgPrefix}, PR passed all tests."
exit 0
else
echo "${msgPrefix}, but with failures. Check left sidebar summary to see which jobs failed."
exit 1
fi