v2 Refactor (BREAKING CHANGES) #1
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: "Tests: E2E" | |
defaults: | |
run: | |
shell: bash | |
env: | |
AWS_REGION: us-west-2 | |
AWS_PROFILE: default | |
NAMESPACE: tftest | |
IZE_LOG_LEVEL: debug | |
IZE_PREFER_RUNTIME: native | |
IZE_PLAIN_TEXT: true | |
IZE_VERSION: 1.1.9 | |
on: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
complete-worker: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
ENV: examples1 | |
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/[email protected] | |
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/${{ github.job }}/ | |
- name: Go TF Test | |
run: | | |
cd test/src | |
go mod tidy | |
go test -v -timeout 60m -run TestExamplesCompleteWorker | |
worker-scheduled: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
ENV: examples2 | |
needs: | |
- complete-worker | |
- web-nginx-proxy | |
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/[email protected] | |
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/${{ github.job }}/ | |
- name: Go TF Test | |
run: | | |
cd test/src | |
go mod tidy | |
go test -v -timeout 60m -run TestExamplesWorkerSchedule | |
complete-web: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
ENV: examples3 | |
needs: | |
- complete-worker | |
- web-nginx-proxy | |
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/[email protected] | |
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/${{ github.job }}/ | |
- name: Go TF Test | |
run: | | |
cd test/src | |
go mod tidy | |
go test -v -timeout 60m -run TestExamplesCompleteWeb | |
web-nginx-proxy: | |
runs-on: ubuntu-latest | |
env: | |
ENV: examples5 | |
timeout-minutes: 60 | |
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/[email protected] | |
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/${{ github.job }}/ | |
- name: Go TF Test | |
run: | | |
cd test/src | |
go mod tidy | |
go test -v -timeout 60m -run TestExamplesWebProxy | |
worker-scheduled-autoscale: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
ENV: examples4 | |
needs: | |
- worker-scheduled | |
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/[email protected] | |
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/${{ github.job }}/ | |
- name: Go TF Test | |
run: | | |
cd test/src | |
go mod tidy | |
go test -v -timeout 60m -run TestExamplesWorkerAutoScheduled |