Skip to content

Commit

Permalink
Add a fixed end job for test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergicastro committed Nov 11, 2024
1 parent 3d0ce29 commit 6cb31aa
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
jobs:
# All test running sequentially take around ~2h.
# Sppliting them in groups that take more or less the same time makes PR's readiness faster
test:
test-group:
strategy:
matrix:
label:
Expand All @@ -37,3 +37,20 @@ jobs:
with:
go-version-file: go.mod
- run: make test

# Have a fixed test to run once matrix tests are completed so we can make this required
test:
runs-on: default-runner-set
# We need this to run always to force-fail (and not skip) if any needed
# job has failed. Otherwise, a skipped job will not fail the workflow.
if: always()
steps:
- run: |
echo "tests completed"
[ "${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'skipped')
}}" == "false" ] || exit 1
needs:
- test-group

0 comments on commit 6cb31aa

Please sign in to comment.