chore(deps): bump github.com/hashicorp/terraform-plugin-framework-validators from 0.12.0 to 0.16.0 #112
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: Code Check and Doc Gen | |
on: [pull_request] | |
permissions: | |
contents: read | |
jobs: | |
# Ensure the project can build first | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Get dependencies | |
run: | | |
go mod tidy | |
git diff --compact-summary --exit-code || \ | |
(echo; echo "Unexpected difference after 'go mod tidy'. Run 'go mod tidy' command and commit."; exit 1) | |
- name: Build | |
run: | | |
make install | |
fmt: | |
name: go fmt | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: | | |
if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then | |
echo "::error::'go fmt' found required formatting changes. Run 'make fmt' on your branch." | |
exit 1; | |
fi | |
gosec: | |
name: Run Gosec Security Scanner | |
needs: [ build ] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
- uses: securego/gosec@master | |
env: | |
GOROOT: '' | |
with: | |
args: ./... | |
vet: | |
name: go vet | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go vet ./... | |
lint: | |
name: golangcli-lint | |
needs: [ build ] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Setting GIT | |
run: git config --global url."https://${{ secrets.GLOBAL_TOKEN }}:x-oauth-basic@github.com/aziontech".insteadOf "https://github.com/aziontech" | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
args: "--config .golintci.yml" | |
only-new-issues: true | |
generate: | |
name: go generate | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
# Use git add -N . to ensure that new files are listed in the git diff check | |
- run: | | |
go generate ./... | |
git add -N . | |
git diff --exit-code || \ | |
(echo; echo "Unexpected difference after code generation. Run 'make generate' command and commit."; exit 1) |