Skip to content

E2E Version 2 Test Matrix #10

E2E Version 2 Test Matrix

E2E Version 2 Test Matrix #10

Workflow file for this run

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 == '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: ${{ !((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) }}
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