From 87cffd70f290867e40d69fd6973b017892a457ab Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Mon, 3 Jun 2024 14:02:47 -0400 Subject: [PATCH] test: always run aggregate unit test check When a shard of unit-tests.yml fails, we want the `success` job to be maked "Failed" (not "Skipped"). That's because "Failed" blocks the PR from merging, whereas "Skipped" does not. This change ensures that `success` always runs to completion rather than being cancelled as soon as a unit test shard fails or is cancelled. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7df346e65810..f5f570ac511a 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -133,6 +133,7 @@ jobs: success: name: Unit tests successful runs-on: ubuntu-20.04 + if: always() needs: [ run-tests ] steps: - name: Decide whether the needed jobs succeeded or failed