-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from hazelops/core-448
ecs-app Terraform Module e2e tests
- Loading branch information
Showing
22 changed files
with
960 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,273 @@ | ||
name: "Tests: TF Examples" | ||
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 |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ output "cloudwatch_event_rule_id" { | |
output "ecs_cluster_name" { | ||
value = module.ecs.cluster_name | ||
} | ||
|
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
Oops, something went wrong.