Acceptance Tests #7
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: Acceptance Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'The ref to checkout e.g the SHA of a fork in PR' | |
type: string | |
required: false | |
default: 'main' | |
tests: | |
description: 'The TESTS pattern to supply to `make testacc`. Default is all tests.' | |
type: string | |
required: false | |
default: 'TestAcc' | |
terraform-version: | |
description: 'Terraform version' | |
type: string | |
required: false | |
default: '1.9.*' | |
jobs: | |
acctest: | |
name: Acceptance Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
concurrency: acctest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.ref }} | |
- uses: actions/setup-go@v5 | |
- run: go mod download | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: ${{ inputs.terraform-version }} | |
terraform_wrapper: false | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: index-stage.docker.io | |
- run: | | |
make testacc TESTS='${{ inputs.tests }}' | |
env: | |
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }} | |
DOCKER_HUB_HOST: "hub-stage.docker.com" | |
TF_ACC: "1" | |
timeout-minutes: 30 |