-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
7 changed files
with
226 additions
and
17 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
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,20 @@ | ||
name: "Test API-PRD with TF-Provider" # for API High-Load with examples on API-PRD | ||
|
||
on: | ||
# NOTE: Uncomment if needed later | ||
#push: | ||
# branches: | ||
# - main | ||
#schedule: | ||
# - cron: '*/15 * 1-9,26-31 3,4 *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
api_test: | ||
name: "Test API-PRD with TF-Provider" | ||
uses: ./.github/workflows/test-api.yaml | ||
secrets: inherit | ||
with: | ||
gitref: main | ||
testenv: PRD |
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,19 @@ | ||
name: "Test API-STG with TF-Provider" # for API High-Load with examples on API-STG | ||
|
||
on: | ||
push: | ||
branches: | ||
- devel | ||
schedule: | ||
- cron: '*/15 * 1-9,26-31 3,4 *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
api_test: | ||
name: "Test API-STG with TF-Provider" | ||
uses: ./.github/workflows/test-api.yaml | ||
secrets: inherit | ||
with: | ||
gitref: feature/example-onboarding-team | ||
testenv: STG |
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,121 @@ | ||
name: "Test API with TF-Provider" # with examples on one API env | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
gitref: | ||
type: string | ||
default: 'devel' | ||
required: true | ||
testenv: | ||
type: string | ||
default: PRD | ||
required: true | ||
description: "STG|PRD" | ||
|
||
jobs: | ||
|
||
api_examples-test: | ||
name: "Test API with Provider examples" | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: "Checkout code" | ||
if: ${{ !env.ACT }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: '${{ inputs.gitref }}' | ||
|
||
- name: "Checkout code (local)" | ||
if: env.ACT | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Verify checked-out code (local)" | ||
if: ${{ env.ACT }} | ||
run: | | ||
git --no-pager show --stat; | ||
git --no-pager status; | ||
- name: "Install Go" | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: "Install Terraform" | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_wrapper: false | ||
terraform_version: '1.5.7' | ||
|
||
- name: "Build Provider" | ||
run: make build | ||
|
||
|
||
### --- testenv: STG ---------------------------------------------------- | ||
|
||
- name: "Test API-STG with Provider acceptance tests" | ||
if: inputs.testenv=='STG' | ||
run: make test-acc | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_STG_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_STG_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_STG_ORG_NAME }}' | ||
|
||
- name: "Test API-STG with Provider quickstart example" | ||
if: inputs.testenv=='STG' | ||
run: | | ||
set -eu -x; | ||
make install; | ||
make test-examples-quickstart ARGS="-f local-build"; | ||
shell: bash | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_STG_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_STG_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_STG_ORG_NAME }}' | ||
|
||
- name: "Test API-STG with Provider onboarding example" | ||
if: inputs.testenv=='STG' | ||
run: | | ||
set -eu -x; | ||
make install; | ||
make test-examples-onboarding ARGS="-f local-build"; | ||
shell: bash | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_STG_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_STG_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_STG_ORG_NAME }}' | ||
|
||
|
||
### --- testenv: PRD ---------------------------------------------------- | ||
|
||
- name: "Test API-PRD with Provider acceptance tests" | ||
if: inputs.testenv=='PRD' | ||
run: make test-acc | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}' | ||
|
||
- name: "Test API-PRD with Provider quickstart example" | ||
if: inputs.testenv=='PRD' | ||
run: | | ||
set -eu -x; | ||
make install; | ||
make test-examples-quickstart ARGS="-f local-build"; | ||
shell: bash | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}' | ||
|
||
- name: "Test API-PRD with Provider onboarding example" | ||
if: inputs.testenv=='PRD' | ||
run: | | ||
set -eu -x; | ||
make install; | ||
make test-examples-onboarding ARGS="-f local-build"; | ||
shell: bash | ||
env: | ||
STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}' | ||
STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}' | ||
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_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
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