Skip to content

ZT Test

ZT Test #686

Workflow file for this run

name: tests
on:
push:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'LICENSE'
schedule:
- cron: '0 13 * * 1-5' # UTC
jobs:
test:
strategy:
matrix:
go-version: [1.19]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: install go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: checkout
uses: actions/checkout@v3
- uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
- name: Download Go Dependencies
run: go mod tidy && go mod vendor
- name: Vet
run: go vet ./...
- name: setup Terraform
uses: hashicorp/setup-terraform@v2
- name: write ZPA Terraform configuration
run: |
cat > main.tf <<EOF
terraform {
required_providers {
zpa = {
source = "zscaler/zpa"
version = ">= 2"
}
}
}
EOF
- name: terraform init
run: terraform init
- name: write ZIA Terraform configuration
run: |
cat > main.tf <<EOF
terraform {
required_providers {
zia = {
source = "zscaler/zia"
version = ">= 2"
}
}
}
EOF
- name: terraform init
run: terraform init
- name: Run go test
env:
ZPA_CLIENT_ID: ${{ secrets.ZPA_CLIENT_ID }}
ZPA_CLIENT_SECRET: ${{ secrets.ZPA_CLIENT_SECRET }}
ZPA_CUSTOMER_ID: ${{ secrets.ZPA_CUSTOMER_ID }}
ZIA_USERNAME: ${{ secrets.ZIA_USERNAME }}
ZIA_PASSWORD: ${{ secrets.ZIA_PASSWORD }}
ZIA_API_KEY: ${{ secrets.ZIA_API_KEY }}
ZIA_CLOUD: ${{ secrets.ZIA_CLOUD }}
ZSCALER_TERRAFORM_INSTALL_PATH: ${{ github.workspace }}
run: make test