Skip to content

Commit 94d3d75

Browse files
authored
chore: 👷 Add conditional step for test results in GitHub Actions (#200)
1 parent eabd00f commit 94d3d75

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/lib-checks.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,14 @@ jobs:
115115

116116
- name: "Run tests"
117117
run: uv run tox
118+
tests-pass: # ref: https://github.com/orgs/community/discussions/4324#discussioncomment-3477871
119+
runs-on: ubuntu-20.04
120+
needs: [tests]
121+
if: ${{ github.event_name != 'schedule' }}
122+
steps:
123+
- name: Tests succeeded
124+
if: ${{ !(contains(needs.*.result, 'failure')) }}
125+
run: exit 0
126+
- name: Tests failed
127+
if: ${{ contains(needs.*.result, 'failure') }}
128+
run: exit 1

0 commit comments

Comments
 (0)