test: always run aggregate unit test check (#34903)
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
This commit is contained in:
1
.github/workflows/unit-tests.yml
vendored
1
.github/workflows/unit-tests.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user