From 7e6380ddc8c5f11b00901cc29847834562d17373 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 25 Nov 2024 13:48:36 +0100 Subject: [PATCH] ci: add unified success actions for checks (#28563) --- .github/workflows/_base-migration.yml | 28 +++++++++++++------- .github/workflows/_base-server-tests.yml | 33 ++++++++++++++---------- .github/workflows/_base-ui-tests.yml | 32 +++++++++++++---------- 3 files changed, 56 insertions(+), 37 deletions(-) diff --git a/.github/workflows/_base-migration.yml b/.github/workflows/_base-migration.yml index cccf66af4d..d10a5400e6 100644 --- a/.github/workflows/_base-migration.yml +++ b/.github/workflows/_base-migration.yml @@ -15,15 +15,6 @@ on: type: number default: 20 jobs: - # This satisfies the required checks on pull requests if tests are intentionally skipped - migration-test-fake: - name: Migrate - runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} - steps: - - name: Pass skipped tests unconditionally - run: "echo Skipped" - migration-test: name: Migrate runs-on: ubuntu-latest @@ -129,3 +120,22 @@ jobs: echo "Printing log: $f"; cat $f done + + migration-test-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 + runs-on: ubuntu-latest + if: ${{ inputs.fake-success != false }} + steps: + - name: Pass skipped tests unconditionally + run: "echo Skipped" + diff --git a/.github/workflows/_base-server-tests.yml b/.github/workflows/_base-server-tests.yml index 583382b5fc..dc2a3969fc 100644 --- a/.github/workflows/_base-server-tests.yml +++ b/.github/workflows/_base-server-tests.yml @@ -47,20 +47,6 @@ jobs: run: | indices=$(seq -s ',' 1 ${{ inputs.parallel-runs }}); echo "indices=[${indices}]" >> $GITHUB_OUTPUT - # This satisfies the required checks on pull requests if tests are intentionally skipped - integration-test-fake: - needs: gen-idx-integration - name: Integration - runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} - strategy: - matrix: - db: ${{ fromJson(inputs.enable-postgres && '["mariadb", "postgres"]' || '["mariadb"]') }} - index: ${{ fromJson(needs.gen-idx-integration.outputs.indices) }} - steps: - - name: Pass skipped tests unconditionally - run: "echo Skipped" - integration-test: needs: gen-idx-integration name: Integration @@ -172,3 +158,22 @@ jobs: echo "Printing log: $f"; 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: + name: Success + runs-on: ubuntu-latest + if: ${{ inputs.fake-success != false }} + steps: + - name: Pass skipped tests unconditionally + run: "echo Skipped" + diff --git a/.github/workflows/_base-ui-tests.yml b/.github/workflows/_base-ui-tests.yml index 972287e4c5..c59ab11b92 100644 --- a/.github/workflows/_base-ui-tests.yml +++ b/.github/workflows/_base-ui-tests.yml @@ -35,20 +35,6 @@ jobs: run: | indices=$(seq -s ',' 1 ${{ inputs.parallel-runs }}); echo "indices=[${indices}]" >> $GITHUB_OUTPUT - # This satisfies the required checks on pull requests if tests are intentionally skipped - ui-test-fake: - needs: gen-idx-integration - name: Integration - runs-on: ubuntu-latest - if: ${{ inputs.fake-success != false }} - strategy: - matrix: - db: ["mariadb"] - index: ${{ fromJson(needs.gen-idx-integration.outputs.indices) }} - steps: - - name: Pass skipped tests unconditionally - run: "echo Skipped" - ui-test: needs: gen-idx-integration name: Integration @@ -160,3 +146,21 @@ jobs: echo "Printing log: $f"; cat $f done + + ui-test-success: + needs: ui-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 + ui-test-success-fake: + name: Success + runs-on: ubuntu-latest + if: ${{ inputs.fake-success != false }} + steps: + - name: Pass skipped tests unconditionally + run: "echo Skipped" +