ci(dependabot): set commit prefix to support release process (#132) #272
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: Test | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
cache: true | |
- run: go build -v . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
cache: true | |
- uses: golangci/golangci-lint-action@v6 | |
versions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Terraform versions | |
id: versions | |
run: | | |
echo "terraform=$(curl -sL https://releases.hashicorp.com/terraform/index.json | jq -c '[ | |
.versions | keys | .[] | | |
{ version: ., semver: capture("(?<major>[0-9]+).(?<minor>[0-9]+).(?<patch>[0-9]+)(?<pre>.*)") } | | |
select(.semver.pre == "") | | |
{ | |
version: .version, | |
group: (.semver.major + "." + .semver.minor), | |
major: .semver.major | tonumber, | |
minor: .semver.minor | tonumber, | |
patch: .semver.patch | tonumber | |
} | |
] | group_by(.group) | [ .[] | sort_by(.patch) | .[-1] | .version ] | sort | .[-2:]')" >> "$GITHUB_OUTPUT" | |
outputs: | |
terraform: ${{ steps.versions.outputs.terraform }} | |
test: | |
runs-on: ubuntu-latest | |
needs: versions | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
terraform: ${{ fromJSON(needs.versions.outputs.terraform) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
cache: true | |
- run: make testacc | |
env: | |
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }} | |
OHDEAR_TOKEN: ${{ secrets.OHDEAR_TOKEN }} | |
OHDEAR_TEAM_ID: 6944 |