Skip to content

Commit 7a3036d

Browse files
authored
Merge pull request #5 from brickhouse-tech/fix/ci-tests-summary-job
ci: add tests summary job for branch protection
2 parents 86b21bf + c4a7b7f commit 7a3036d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,20 @@ jobs:
2424
- run: npm install
2525
- run: npm run lint
2626
- run: npm test
27+
28+
tests:
29+
name: tests
30+
needs: [test]
31+
runs-on: ubuntu-latest
32+
if: always()
33+
steps:
34+
- name: Check test results
35+
run: |
36+
results=($(echo '${{ toJSON(needs.*.result) }}' | jq -r '.[]'))
37+
for r in "${results[@]}"; do
38+
if [[ "$r" != "success" ]]; then
39+
echo "One or more jobs failed: $r"
40+
exit 1
41+
fi
42+
done
43+
echo "All jobs passed"

0 commit comments

Comments
 (0)