Skip to content

Commit 0e8722c

Browse files
authored
Make tests check function correctly (#1381)
1 parent dcb6839 commit 0e8722c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
# Aggregate job that provides a single check for all tests passing
3333
tests:
3434
runs-on: ubuntu-24.04
35+
if: always() # Always run, even on cancellation or failure
3536
needs:
3637
- python
3738
- cassandra
@@ -55,13 +56,23 @@ jobs:
5556
- valkey
5657

5758
steps:
58-
- name: Success
59-
run: echo "Success!"
59+
- name: Status
60+
run: |
61+
if [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
62+
echo "Workflow cancelled."
63+
exit 1
64+
elif [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
65+
echo "One or more jobs failed."
66+
exit 1
67+
else
68+
echo "All jobs completed successfully."
69+
exit 0
70+
fi
6071
6172
# Combine and upload coverage data
6273
coverage:
63-
if: success() || failure() # Does not run on cancelled workflows
6474
runs-on: ubuntu-24.04
75+
if: success() || failure() # Does not run on cancelled workflows
6576
needs:
6677
- tests
6778

0 commit comments

Comments
 (0)