Skip to content

run tests on library changes #68

run tests on library changes

run tests on library changes #68

Workflow file for this run

name: Terraform Provider Tests
on:
pull_request:
paths:
- '.github/workflows/test.yaml'
- '**.go'
-'go.mod'

Check failure on line 8 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 8
permissions:
# Permission for checking out code
contents: read
jobs:
acceptance:
name: Acceptance Tests (Terraform ${{ matrix.terraform-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
terraform-version:
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
- '1.4.*'
- '1.5.*'
- '1.6.*'
- '1.7.*'
steps:
- uses: actions/checkout@v3
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: kind
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform-version }}
terraform_wrapper: false
- run: go test -v -cover ./... -timeout 20m
env:
TF_ACC: '1'
PVN_ORG_SLUG: ${{ vars.PVN_ORG_SLUG }}
PVN_BASE_DOMAIN: ${{ vars.PVN_BASE_DOMAIN }}
PVN_API_TOKEN: ${{ secrets.PVN_API_TOKEN }}
DOCKERUB_PASSWORD: ${{ secrets.DOCKERUB_PASSWORD }}
ECR_ACCESS_KEY_ID: ${{ secrets.ECR_ACCESS_KEY_ID }}
ECR_SECRET_ACCESS_KEY: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- run: go test -v -cover ./...