ci: add unified success actions for checks (#28563)

This commit is contained in:
David Arnold 2024-11-25 13:48:36 +01:00 committed by GitHub
parent bb173b189b
commit 7e6380ddc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 56 additions and 37 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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"