Skip to content

[CORE-718] Switch to matrix runner #62

[CORE-718] Switch to matrix runner

[CORE-718] Switch to matrix runner #62

Workflow file for this run

name: "Tests: E2E"
concurrency: # This need to ensure that only a single job or workflow using the same concurrency group will run at a time.
group: ${{ github.workflow }}
cancel-in-progress: false
defaults:
run:
shell: bash
env:
AWS_REGION: us-west-2
NAMESPACE: tftest
IZE_LOG_LEVEL: debug
IZE_PLAIN_TEXT: true
IZE_VERSION: 0.0.0-dev
AWS_PROFILE: debug
on:
workflow_dispatch:
pull_request:
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 5 # VPCs are limited
matrix:
include:
# - name: complete-worker
# env: e2e01
# test_name: TestExamplesCompleteWorker
# - name: worker-scheduled
# env: e2e02
# test_name: TestExamplesWorkerSchedule
- name: complete-web
env: e2e03
test_name: TestExamplesCompleteWeb
# - name: web-nginx-proxy
# env: e2e05
# test_name: TestExamplesWebProxy
# - name: worker-scheduled-autoscale
# env: e2e04
# test_name: TestExamplesWorkerAutoScheduled
# - name: complete-worker-ec2
# env: e2e05
# test_name: TestExamplesWorkerEc2
env:
ENV: ${{ matrix.env }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
- name: Checkout Code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_SA }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_SA }}
aws-region: ${{ env.AWS_REGION }}
- name: Generate Test SSH Key
run: ssh-keygen -q -f ~/.ssh/id_rsa
- name: IZE setup
uses: hazelops/action-setup-ize@0.0.1
with:
version: ${{ env.IZE_VERSION }}
- name: IZE init
run: ize init
- name: IZE create AWS Profile
run: ize gen aws-profile
- name: IZE gen tfenv
run: ize gen tfenv
- name: Copy generated files
run: |
cp -R .ize/env/${{ env.ENV }}/*.* examples/${{ matrix.name }}/
- name: Go TF Test
working-directory: test
run: |
go mod tidy
go test -v -timeout 60m -run ${{ matrix.test_name }} -json | tee > result-${{ matrix.test_name }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.test_name }}
path: test/result-${{ matrix.test_name }}.json