Skip to content

DOCSP-54624 -- Added note on function limitation for Terraform (#3779) #11910

DOCSP-54624 -- Added note on function limitation for Terraform (#3779)

DOCSP-54624 -- Added note on function limitation for Terraform (#3779) #11910

Workflow file for this run

name: 'Code Health'
# Set of validations run on each pull request and merged commits to master.
on:
push:
branches:
- master
- master-v1
paths-ignore: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-paths
- '*.md'
- 'examples/**'
- 'LICENSE'
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
with:
go-version-file: 'go.mod'
- name: Build
run: make build
unit-test:
needs: build
runs-on: ubuntu-latest
permissions:
pull-requests: write # Needed by sticky-pull-request-comment
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# Avoid: cannot run Terraform provider tests: error calling terraform version command: fork/exec /tmp/plugintest-terraformXXX/terraform: text file busy also speeds up the tests as terraform will already exist on path.
# Also speeds up the tests
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: '1.13.x'
terraform_wrapper: false
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
with:
go-version-file: 'go.mod'
- name: Unit Test
run: make test
lint:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Install Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
with:
go-version-file: 'go.mod'
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
with:
version: v2.4.0 # Also update GOLANGCI_VERSION variable in GNUmakefile when updating this version
- name: actionlint
run: |
make tools
echo "::add-matcher::.github/actionlint-matcher.json"
actionlint -color
shell: bash
shellcheck:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Run ShellCheck
uses: bewuethr/shellcheck-action@80bac2daa9fcf95d648200a793d00060857e6dc4
generate-doc-check:
runs-on: ubuntu-latest
permissions: {}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- run: make tools generate-docs-all
- name: Find mutations
id: self_mutation
run: |-
git add .
git diff --staged --patch --exit-code > doc.repo.patch || echo "self_mutation_happened=true" >> "${GITHUB_OUTPUT}"
- name: Fail build on mutation
if: steps.self_mutation.outputs.self_mutation_happened
run: |-
echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch."
cat doc.repo.patch
exit 1
call-acceptance-tests-workflow:
needs: [build, lint, shellcheck, unit-test, generate-doc-check]
secrets: inherit
uses: ./.github/workflows/acceptance-tests.yml
with:
reduced_tests: true