From 968530cadda8b80153b2724c003137299f02c304 Mon Sep 17 00:00:00 2001 From: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:05:31 -0700 Subject: [PATCH] chore: aggregate test results for required statuses (#592) Status check names include matrix elements. This means that required status names would have to change if any of those matrix elements changed in the future. This change aggregates these checks into a single status check with a constant name, suitable for use as a required status. Fixes https://dfinity.atlassian.net/browse/SDK-582 --- .github/workflows/e2e-tests.yml | 10 ++++++++++ .github/workflows/mitm.yml | 10 ++++++++++ .github/workflows/prettier.yml | 10 ++++++++++ .github/workflows/unit-tests.yml | 10 ++++++++++ 4 files changed, 40 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9da6e40ba..4b7da5694 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -47,3 +47,13 @@ jobs: env: CI: true REPLICA_PORT: 8000 + + aggregate: + name: e2e:required + if: ${{ always() }} + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: check e2e test result + if: ${{ needs.test.result != 'success' }} + run: exit 1 diff --git a/.github/workflows/mitm.yml b/.github/workflows/mitm.yml index 437dea9f7..c1c65d824 100644 --- a/.github/workflows/mitm.yml +++ b/.github/workflows/mitm.yml @@ -63,3 +63,13 @@ jobs: REPLICA_PORT: 8888 MITM: true run: npm run mitm --workspaces --if-present + + aggregate: + name: mitm:required + if: ${{ always() }} + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: check e2e test result + if: ${{ needs.test.result != 'success' }} + run: exit 1 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 394280fcb..a317bc7c8 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -28,3 +28,13 @@ jobs: - run: npm install -g npm - run: npm install prettier pretty-quick - run: npm run prettier:check + + aggregate: + name: format:required + if: ${{ always() }} + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: check e2e test result + if: ${{ needs.test.result != 'success' }} + run: exit 1 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b3338d6ee..5ef40e12c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -42,3 +42,13 @@ jobs: - run: npm run test env: CI: true + + aggregate: + name: unit:required + if: ${{ always() }} + needs: [ test ] + runs-on: ubuntu-latest + steps: + - name: check e2e test result + if: ${{ needs.test.result != 'success' }} + run: exit 1