E2E Version 2 Test Matrix #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Version 2 Test Matrix | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
workflow_call: | |
inputs: | |
ref: | |
type: string | |
skipRefCheck: | |
type: boolean | |
default: true | |
permissions: | |
id-token: write | |
jobs: | |
plan-infra: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.ref }} | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '~1.20.3' | |
cache-dependency-path: "**/*.sum" | |
- run: | | |
go run ./main.go matrix | |
shell: bash | |
id: matrix | |
if: | |
(github.event_name == 'workflow_call' || github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')) && | |
(github.event_name == 'repository_dispatch' && | |
github.event.client_payload.slash_command.args.named.sha != '' && | |
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.args.named.sha)) || | |
inputs.skipRefCheck | |
- name: Ensure ref | |
uses: actions/github-script@v6 | |
if: ${{ !(inputs.skipRefCheck) }} | |
with: | |
script: core.setFailed('Ref is not latest') | |
test: | |
needs: plan-infra | |
strategy: | |
fail-fast: false # this is false because we usually want to retry at individual infra level if there is a failure and it helps to see if only one infra is failing | |
matrix: ${{fromJson(needs.plan-infra.outputs.matrix)}} | |
uses: ./.github/workflows/e2ev2-provision-test.yaml | |
with: | |
name: ${{ matrix.name }} | |
ref: ${{ inputs.ref }} | |
secrets: inherit |