Actions: Join on test suites (#106930)

This commit is contained in:
Mariell Hoversholm
2025-06-18 17:39:16 +02:00
committed by GitHub
parent 05b458741e
commit 3f69249bc8
4 changed files with 79 additions and 6 deletions
+25
View File
@@ -136,3 +136,28 @@ jobs:
name: ${{ steps.set-suite-name.outputs.suite }}-${{ github.run_number }}
path: videos
retention-days: 1
# This is the job that is actually required by rulesets.
# We want to only require one job instead of all the individual tests.
# Future work also allows us to start skipping some tests based on changed files.
required-e2e-tests:
needs:
- run-e2e-tests
# always() is the best function here.
# success() || failure() will skip this function if any need is also skipped.
# That means conditional test suites will fail the entire requirement check.
if: always()
name: All E2E tests complete
runs-on: ubuntu-latest
steps:
- name: Check test suites
env:
NEEDS: ${{ toJson(needs) }}
run: |
FAILURES="$(echo "$NEEDS" | jq 'with_entries(select(.value.result == "failure")) | map_values(.result)')"
echo "$FAILURES"
if [ "$(echo "$FAILURES" | jq '. | length')" != "0" ]; then
exit 1
fi
echo "All OK!"