Skip to content

Commit

Permalink
Fix required checks check
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Mar 19, 2024
1 parent be3c808 commit 39d79df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,18 @@ jobs:
required-checks:
name: Required checks 🐍
needs: [changes, check, serialization-schema]
if: always()
if: !cancelled()
runs-on: ubuntu-latest
steps:
- name: Fail if required checks failed
if: (failure() || cancelled())
# This condition should simply be `if: failure() || cancelled()`,
# but there seems to be a bug in the github workflow runner.
#
# See https://github.com/orgs/community/discussions/80788
if: |
needs.changes.result == 'failure' || needs.changes.result == 'cancelled' ||
needs.check.result == 'failure' || needs.check.result == 'cancelled' ||
needs.serialization-schema.result == 'failure' || needs.serialization-schema.result == 'cancelled'
run: |
echo "Required checks failed"
echo "Please check the logs for more information"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,18 @@ jobs:
required-checks:
name: Required checks 🦀
needs: [changes, check, tests-stable]
if: always()
if: !cancelled()
runs-on: ubuntu-latest
steps:
- name: Fail if required checks failed
if: (failure() || cancelled())
# This condition should simply be `if: failure() || cancelled()`,
# but there seems to be a bug in the github workflow runner.
#
# See https://github.com/orgs/community/discussions/80788
if: |
needs.changes.result == 'failure' || needs.changes.result == 'cancelled' ||
needs.check.result == 'failure' || needs.check.result == 'cancelled' ||
needs.tests-stable.result == 'failure' || needs.tests-stable.result == 'cancelled'
run: |
echo "Required checks failed"
echo "Please check the logs for more information"
Expand Down

0 comments on commit 39d79df

Please sign in to comment.