Skip to content

Commit 84e253a

Browse files
committed
ci: add opentofu to test matrix
1 parent 49263b4 commit 84e253a

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,30 +87,51 @@ jobs:
8787
flags: unit
8888

8989
acceptance:
90+
if: ${{ !contains(github.event.head_commit.message, '[skip acc]') }}
9091
name: Acceptance Tests
9192
needs: build
9293
runs-on: ubuntu-latest
9394
timeout-minutes: 15
94-
if: ${{ !contains(github.event.head_commit.message, '[skip acc]') }}
95+
96+
concurrency:
97+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.tool }}-${{ matrix.version }}
98+
cancel-in-progress: true
99+
95100
strategy:
101+
fail-fast: false
96102
# todo: parallelism isn't working due to acceptance test resource name collision
97103
max-parallel: 1
98-
fail-fast: false
99104
matrix:
100-
terraform:
101-
# - "1.5.7" # todo: Coolify AccTest server is being rate limited, causing test failures
102-
- "1.9.*"
105+
include:
106+
# - tool: terraform
107+
# version: v1.5.7
108+
- tool: terraform
109+
version: v1.9.x
110+
- tool: opentofu
111+
version: v1.8.x
103112
steps:
104113
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
105114
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
106115
with:
107116
go-version-file: "go.mod"
108117
cache: true
109-
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
118+
- run: go mod download
119+
120+
- if: matrix.tool == 'terraform'
121+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
110122
with:
111-
terraform_version: ${{ matrix.terraform }}
123+
terraform_version: ${{ matrix.version }}
112124
terraform_wrapper: false
113-
- run: go mod download
125+
- if: matrix.tool == 'opentofu'
126+
uses: opentofu/setup-opentofu@12f4debbf681675350b6cd1f0ff8ecfbda62027b # v1.0.4
127+
with:
128+
tofu_version: ${{ matrix.version }}
129+
tofu_wrapper: false
130+
- if: matrix.tool == 'opentofu'
131+
run: |
132+
echo TF_ACC_TERRAFORM_PATH="$(which tofu)" >> $GITHUB_ENV
133+
echo TF_ACC_PROVIDER_NAMESPACE="hashicorp" >> $GITHUB_ENV
134+
echo TF_ACC_PROVIDER_HOST="registry.opentofu.org" >> $GITHUB_ENV
114135
115136
- uses: tailscale/github-action@67573e622a7b555a2f4e2078c6ad161201e3e91e # Avoiding "v2" tag due to outdated action
116137
with:
@@ -120,7 +141,7 @@ jobs:
120141
authkey: ${{ secrets.TS_AUTHKEY }}
121142
statedir: /tmp/tailscale-state/
122143
tags: tag:ci
123-
version: 1.76.1
144+
version: 1.76.6
124145
- run: |
125146
go clean -testcache
126147
go test -v \

.goreleaser.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ builds:
2626
- goos: darwin
2727
goarch: "386"
2828
binary: "{{ .ProjectName }}_v{{ .Version }}"
29+
2930
archives:
3031
- format: zip
3132
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
33+
3234
checksum:
3335
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
3436
algorithm: sha256
3537
extra_files:
3638
- glob: "terraform-registry-manifest.json"
3739
name_template: "{{ .ProjectName }}_{{ .Version }}_manifest.json"
40+
3841
signs:
3942
- artifacts: checksum
4043
args:
@@ -47,6 +50,7 @@ signs:
4750
- "${signature}"
4851
- "--detach-sign"
4952
- "${artifact}"
53+
5054
release:
5155
draft: true
5256
replace_existing_draft: true

0 commit comments

Comments
 (0)