Skip to content

Commit

Permalink
Add acceptance test GHA workflow for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
twelsh-aw committed Aug 22, 2024
1 parent 247eec9 commit 6de2fbf
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/acctest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Acceptance Tests

on:
workflow_run:
workflows:
- CI
types:
- completed

workflow_dispatch:
inputs:
terraform-version:
description: 'Terraform version'
type: string
required: false
default: '1.9.*'

jobs:
acctest:
name: Acceptance Test
runs-on: ubuntu-latest
timeout-minutes: 60
environment: acctest
concurrency: acctest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true

- run: go mod download

- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: ${{ inputs.terraform-version || '1.9.*' }}
terraform_wrapper: false

- run: |
go test ./... -run=TestAcc -v
env:
DOCKER_USERNAME: dockerterraformprovideracctest
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
TF_ACC: "1"
timeout-minutes: 30
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
- run: |
with:
go-version-file: "go.mod"
cache: true

- name: vet
run: |
go vet ./...

0 comments on commit 6de2fbf

Please sign in to comment.