-
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.
- Loading branch information
1 parent
104c74a
commit a4f203a
Showing
1 changed file
with
21 additions
and
207 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 |
---|---|---|
|
@@ -21,166 +21,30 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
complete-worker: | ||
test-examples: | ||
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 | ||
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 | ||
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 | ||
strategy: | ||
matrix: | ||
include: | ||
- name: complete-worker | ||
env: cmpltwrkr | ||
test_name: TestExamplesCompleteWorker | ||
- name: worker-scheduled | ||
env: wkrkschd | ||
test_name: TestExamplesWorkerSchedule | ||
- name: complete-web | ||
env: cmplweb | ||
test_name: TestExamplesCompleteWeb | ||
- name: web-nginx-proxy | ||
env: webngnxprx | ||
test_name: TestExamplesWebProxy | ||
- name: worker-scheduled-autoscale | ||
env: webschdautscl | ||
test_name: TestExamplesWorkerAutoScheduled | ||
|
||
- name: Copy generated files | ||
run: | | ||
cp -R .ize/env/${{ env.ENV }}/*.* examples/${{ github.job }}/ | ||
- name: Go TF Test | ||
run: | | ||
cd test | ||
go mod tidy | ||
go test -v -timeout 60m -run TestExamplesCompleteWeb | ||
web-nginx-proxy: | ||
runs-on: ubuntu-latest | ||
env: | ||
ENV: examples5 | ||
timeout-minutes: 60 | ||
ENV: ${{ matrix.env }} | ||
|
||
steps: | ||
- name: Install Go | ||
|
@@ -223,55 +87,5 @@ jobs: | |
run: | | ||
cd test | ||
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 | ||
go test -v -timeout 60m -run ${{ matrix.test_name }} | ||
- 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 | ||
go mod tidy | ||
go test -v -timeout 60m -run TestExamplesWorkerAutoScheduled |