ZPA Test #154
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: ZPA Test | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
merge_group: | |
types: [checks_requested] | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 14 * * 1-5' # UTC | |
workflow_dispatch: | |
jobs: | |
zpa-qa1-tenants: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
goVersion: ["1.21"] | |
environment: | |
- ZPA_QA_TENANT01 | |
- ZPA_QA_TENANT02 | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Adjust for Test Concurrency | |
run: | | |
if [ "${{ matrix.goVersion }}" = "1.20" ]; then | |
echo "Introducing delay for Go 1.20 tests to avoid conflicts..." | |
sleep 10 # Adjust the sleep duration as needed | |
fi | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.goVersion }} | |
- name: Set Go env | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Pull external libraries | |
run: make vendor | |
- name: Run tests with retry | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
timeout_minutes: 20 | |
command: | | |
make test:unit | |
make test:unit:zpa | |
make sweep:zpa | |
make test:integration:zpa | |
env: | |
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }} | |
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }} | |
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }} | |
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }} | |
ZPA_SDK_TEST_SWEEP: ${{ secrets.ZPA_SDK_TEST_SWEEP }} | |
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }} | |
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }} | |
zpa-qa2-tenants: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
goVersion: ["1.21"] | |
environment: | |
- ZPA_QA2_TENANT01 | |
# - ZPA_QA2_TENANT02 | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.goVersion }} | |
- name: Set Go env | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Pull external libraries | |
run: make vendor | |
- name: Run tests with retry | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
timeout_minutes: 20 | |
command: | | |
make test:unit | |
make test:unit:zpa | |
make sweep:zpa | |
make test:integration:zpa | |
env: | |
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }} | |
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }} | |
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }} | |
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }} | |
ZPA_SDK_TEST_SWEEP: ${{ secrets.ZPA_SDK_TEST_SWEEP }} | |
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }} | |
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }} | |
zpa-beta-tenants: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
goVersion: ["1.21"] | |
environment: | |
- ZPA_BETA_TENANT01 | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.goVersion }} | |
- name: Set Go env | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Pull external libraries | |
run: make vendor | |
- name: Run tests with retry | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
timeout_minutes: 20 | |
command: | | |
make test:unit | |
make test:unit:zpa | |
make sweep:zpa | |
make test:integration:zpa | |
env: | |
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }} | |
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }} | |
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }} | |
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }} | |
ZPA_SDK_TEST_SWEEP: ${{ secrets.ZPA_SDK_TEST_SWEEP }} | |
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }} | |
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }} | |
needs: | |
- zpa-qa1-tenants | |
- zpa-qa2-tenants | |
zpa-prod-tenants: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
goVersion: ["1.21"] | |
environment: | |
- ZPA_PROD_TENANT01 | |
environment: ${{ matrix.environment }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.goVersion }} | |
- name: Set Go env | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Pull external libraries | |
run: make vendor | |
- name: Run tests with retry | |
uses: nick-fields/retry@v2 | |
with: | |
max_attempts: 3 | |
timeout_minutes: 20 | |
command: | | |
make test:unit | |
make test:unit:zpa | |
make sweep:zpa | |
make test:integration:zpa | |
env: | |
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }} | |
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }} | |
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }} | |
ZPA_CLOUD: ${{ secrets.ZPA_CLOUD }} | |
ZPA_SDK_TEST_SWEEP: ${{ secrets.ZPA_SDK_TEST_SWEEP }} | |
OKTA_CLIENT_ORGURL: ${{ secrets.OKTA_CLIENT_ORGURL }} | |
OKTA_CLIENT_TOKEN: ${{ secrets.OKTA_CLIENT_TOKEN }} | |
needs: | |
- zpa-qa1-tenants | |
- zpa-qa2-tenants | |
- zpa-beta-tenants |