From c9a3a470403907070fbfa1b1ea48d5accaf544cd Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Mon, 3 Jun 2024 13:58:04 -0400 Subject: [PATCH] test: fail aggregate check if any unit test shard fails This ensures that the `success` job in unit-tests.yml always runs, allowing us to protect master from unit test failures by making the `success` job required. From https://github.com/marketplace/actions/alls-green#options: > Important: For this to work properly, it is a must to have the job always run, > otherwise GitHub will make it skipped when any of the dependencies fail. In > some contexts, skipped is interpreted as success which may lead to undersired, > unobvious and even dangerous (as in security breach "dangerous") side-effects. Closes https://github.com/openedx/edx-platform/issues/34789 --- .github/workflows/unit-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7df346e65810..d3434632d79f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -132,6 +132,7 @@ jobs: # https://github.com/orgs/community/discussions/33579 success: name: Unit tests successful + if: always() runs-on: ubuntu-20.04 needs: [ run-tests ] steps: @@ -202,3 +203,4 @@ jobs: coverage report coverage xml - uses: codecov/codecov-action@v4 +f