chore(deps): bump the actions-deps-minor-patch group across 1 directory with 10 updates #95
This file contains hidden or 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
# Terraform Provider testing workflow. | |
name: Tests | |
# This GitHub action runs your tests for each pull request and push. | |
# Optionally, you can turn it on using a schedule for regular testing. | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
actions: read | |
security-events: write | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 | |
with: | |
languages: go | |
build-mode: manual | |
queries: security-extended,security-and-quality | |
- run: go mod download | |
- run: go build -v . | |
- name: Run linters | |
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 | |
with: | |
version: latest | |
skip-cache: true | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 | |
with: | |
category: "/language:go" | |
- name: Archive Build | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: build | |
path: | | |
terraform-provider-quicknode | |
pr-scan: | |
uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1 | |
trivy-scan: | |
name: Trivy Scan | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
actions: read | |
contents: read | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Trivy Scan | |
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.33.1 | |
with: | |
scan-type: fs | |
scan-ref: '.' | |
exit-code: '1' | |
output: trivy-results.sarif | |
format: sarif | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3 | |
if: always() | |
with: | |
sarif_file: 'trivy-results.sarif' | |
generate: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_wrapper: false | |
- run: make generate | |
- name: git diff | |
run: | | |
git diff --compact-summary --exit-code || \ | |
(echo; echo "Unexpected difference in directories after code generation. Run 'make generate' command and commit."; exit 1) | |
- name: setup goreleaser | |
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
with: | |
install-only: true | |
- run: make validate | |
test: | |
name: Terraform Provider Unit Tests | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
permissions: | |
contents: read | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go mod download | |
- run: go test -v -cover ./... -run Test -skip TestAcc | |
# Run acceptance tests in a matrix with Terraform CLI versions | |
acctest: | |
# skip when triggered by dependabot, due to no access to secrets | |
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }} | |
name: Terraform Provider Acceptance Tests | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
# list whatever Terraform versions here you would like to support | |
terraform: | |
- '1.8.*' | |
- '1.9.*' | |
- '1.10.*' | |
permissions: | |
contents: read | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: ${{ matrix.terraform }} | |
terraform_wrapper: false | |
- run: go mod download | |
- env: | |
TF_ACC: "1" | |
QUICKNODE_APIKEY: ${{ secrets.QUICKNODE_APIKEY }} | |
run: go test -v -cover ./... -run TestAcc | |
timeout-minutes: 10 | |
rollup: | |
name: Success Rollup | |
if: always() | |
needs: | |
- build | |
- pr-scan | |
- trivy-scan | |
- generate | |
- test | |
- acctest | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@e80931f0826124db0a241ba9876c8e8eb3ca4d75 # v1.0.2-beta2 | |
- run: exit 1 | |
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} |