Skip to content

🤖 Collibra Data Access Terraform Provider - Acceptance tests #134

🤖 Collibra Data Access Terraform Provider - Acceptance tests

🤖 Collibra Data Access Terraform Provider - Acceptance tests #134

name: 🤖 Collibra Data Access Terraform Provider - Acceptance tests
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: "acceptance-${{ github.ref }}" # probably multiple runs will still fail
cancel-in-progress: false
jobs:
test:
name: Terraform Provider Acceptance Tests
runs-on:
- runs-on
- runner=sm
- env=production-eu
- tag=terraform-provider-data-access
- tag=job-${{ github.job }}-${{ github.run_id }}
timeout-minutes: 20
strategy:
max-parallel: 1
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.10.*'
- '1.11.*'
- '1.12.*'
- '1.13.*'
- '1.14.*'
- '1.15.*'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup private repo access
run: |
git config --global url.https://${GH_ACCESS_TOKEN}@github.com/.insteadOf https://github.com/
env:
GH_ACCESS_TOKEN: ${{ secrets.COLLIBRA_GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: "go.sum"
check-latest: true
cache: true
- name: Install Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Download
run: go mod download
- name: Acceptance tests
env:
TF_ACC: "1"
TF_VAR_collibra_user: ${{ secrets.COLLIBRA_USER }}
TF_VAR_collibra_secret: ${{ secrets.COLLIBRA_SECRET }}
TF_VAR_collibra_url: ${{ secrets.COLLIBRA_URL }}
run: >
go run gotest.tools/gotestsum@latest --format github-actions
--junitfile acceptance-test-results.xml
-- -cover -coverprofile=coverage.txt ./internal/ -timeout 0
timeout-minutes: 15
- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: acceptance-test-results-${{ strategy.job-index }}
retention-days: 5
if-no-files-found: error
path: acceptance-test-results.xml
- name: Upload coverage report
if: ${{ matrix.terraform == '1.15.*' }}
uses: actions/upload-artifact@v4
with:
name: acceptance-test-coverage
retention-days: 1
if-no-files-found: error
path: coverage.txt