Skip to content

Commit

Permalink
add acctests on prod US (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-omris authored Jun 23, 2022
1 parent 54fe08f commit f959836
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,86 @@ jobs:
# run: |
# cmd/inext discard
# go test --timeout 20m -v -cover ./internal/resources/tests/
# cmd/inext discard
test-produs:
name: Test Prod US
needs: build
environment:
name: ProdUS
url: https://portal.checkpoint.com
runs-on: ubuntu-latest
timeout-minutes: 100
concurrency: acctests-${{ github.event_name }}-produs
strategy:
max-parallel: 1
fail-fast: true
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '0.13.*'
- '0.14.*'
- '0.15.*'
- '1.0.*'
- '1.1.*'
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.18'
id: go

- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Get dependencies
run: |
go mod download
- name: Build CLI
run: |
cd cmd
go build -o inext -v .
- name: TF acceptance tests push
if: ${{ github.event_name == 'push' }}
timeout-minutes: 20
env:
INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_PUSH }}
INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_PUSH }}
INEXT_REGION: us
TF_ACC: "1"
run: |
cmd/inext discard
go test --timeout 20m -v -cover ./internal/resources/tests/
cmd/inext discard
- name: TF acceptance tests pull request
if: ${{ github.event_name == 'pull_request' }}
timeout-minutes: 20
env:
INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_PR }}
INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_PR }}
INEXT_REGION: us
TF_ACC: "1"
run: |
cmd/inext discard
go test --timeout 20m -v -cover ./internal/resources/tests/
cmd/inext discard
# - name: TF acceptance tests schedule
# if: ${{ github.event_name == 'schedule' }}
# timeout-minutes: 20
# env:
# INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_SCHEDULE }}
# INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_SCHEDULE }}
# INEXT_REGION: us
# TF_ACC: "1"
# run: |
# cmd/inext discard
# go test --timeout 20m -v -cover ./internal/resources/tests/
# cmd/inext discard

0 comments on commit f959836

Please sign in to comment.