From 9cab72843f7ed50e0808905039c9264e103f4847 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 25 Nov 2024 14:47:21 +0100 Subject: [PATCH] ci: add unified success actions for checks (#28563) [follow up] (#28564) --- .github/workflows/_base-migration.yml | 28 ++++++++++++--------- .github/workflows/_base-server-tests.yml | 24 ++++++++++-------- .github/workflows/_base-ui-tests.yml | 32 +++++++++++++++++------- 3 files changed, 52 insertions(+), 32 deletions(-) diff --git a/.github/workflows/_base-migration.yml b/.github/workflows/_base-migration.yml index d10a5400e6..b4d737b47c 100644 --- a/.github/workflows/_base-migration.yml +++ b/.github/workflows/_base-migration.yml @@ -15,6 +15,10 @@ on: type: number default: 20 jobs: + migration-test: + name: Migrate + runs-on: ubuntu-latest + if: ${{ inputs.fake-success != false }} migration-test: name: Migrate runs-on: ubuntu-latest @@ -121,21 +125,21 @@ jobs: cat $f done - migration-test-success: + # TIP: Use these for checks, e.g. Server / Migration / Success + success: name: Success - needs: migration-test - runs-on: ubuntu-latest if: ${{ inputs.fake-success == false }} - steps: - - name: Passed - run: "echo Passed" - - # This satisfies the required checks on pull requests if tests are intentionally skipped - migration-test-success-fake: - name: Success + needs: [migration-test] runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} steps: - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} + run: "echo Skipped" + success: + name: Success + if: ${{ inputs.fake-success != false }} + runs-on: ubuntu-latest + steps: + - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} run: "echo Skipped" - diff --git a/.github/workflows/_base-server-tests.yml b/.github/workflows/_base-server-tests.yml index dc2a3969fc..98a5646956 100644 --- a/.github/workflows/_base-server-tests.yml +++ b/.github/workflows/_base-server-tests.yml @@ -159,21 +159,23 @@ jobs: cat $f done - integration-test-success: - needs: [unit-test, integration-test] - name: Success - runs-on: ubuntu-latest - if: ${{ inputs.fake-success == false }} - steps: - - name: Passed - run: "echo Passed" - # This satisfies the required checks on pull requests if tests are intentionally skipped - integration-test-success-fake: + # TIP: Use these for checks, e.g. Server / Tests / Success + success: name: Success + if: ${{ inputs.fake-success == false }} + needs: [unit-test, integration-test] runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} steps: - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} + run: "echo Skipped" + success: + name: Success + if: ${{ inputs.fake-success != false }} + runs-on: ubuntu-latest + steps: + - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} run: "echo Skipped" diff --git a/.github/workflows/_base-ui-tests.yml b/.github/workflows/_base-ui-tests.yml index c59ab11b92..e71aa75339 100644 --- a/.github/workflows/_base-ui-tests.yml +++ b/.github/workflows/_base-ui-tests.yml @@ -147,20 +147,34 @@ jobs: cat $f done - ui-test-success: - needs: ui-test + success: name: Success + needs: [ui-test] runs-on: ubuntu-latest - if: ${{ inputs.fake-success == false }} steps: - name: Passed + if: ${{ inputs.fake-success == false }} run: "echo Passed" - # This satisfies the required checks on pull requests if tests are intentionally skipped - ui-test-success-fake: - name: Success - runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} - steps: - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} + run: "echo Skipped" + + # TIP: Use these for checks, e.g. UI / Tests (Cypress) / Success + success: + name: Success + if: ${{ inputs.fake-success == false }} + needs: [unit-test, integration-test] + runs-on: ubuntu-latest + steps: + - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} + run: "echo Skipped" + success: + name: Success + if: ${{ inputs.fake-success != false }} + runs-on: ubuntu-latest + steps: + - name: Pass skipped tests unconditionally + if: ${{ inputs.fake-success != false }} run: "echo Skipped"