Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add acceptance test GHA workflow for CI #26

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/acctest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Acceptance Tests

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

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: 15
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 }}
terraform_wrapper: false

- run: |
go test ./... -run=TestAcc -v
env:
TF_ACC: "1"
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
timeout-minutes: 10
16 changes: 15 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ 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 ./...

acctest:
needs: build
if: ${{ github.event_name == 'pull_request' }}
name: Acceptance Tests
uses: ./.github/workflows/acctest.yaml
with:
terraform-version: '1.9.*'
Loading