Skip to content

Commit 970711e

Browse files
0x2b3bfa0tasdomas
andauthored
Improve test and release workflows (#672)
* Build releases with Go 1.19 * Update all the setup-go and checkout pins * Use go-version-file Co-authored-by: Domas Monkus <domas@monkus.lt> * fixup! Use go-version-file * Simplify release workflow and announce on Slack * fixup! Simplify release workflow and announce on Slack * Cleanup Slack options * fixup! Cleanup Slack options Co-authored-by: Domas Monkus <domas@monkus.lt>
1 parent e85974b commit 970711e

File tree

7 files changed

+196
-91
lines changed

7 files changed

+196
-91
lines changed

.github/workflows/build-ami.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
build-ami:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
- run: |
1212
packer init environment
1313
packer build environment

.github/workflows/release.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
name: Release
22
on:
33
release:
4-
types: [published]
4+
types: [prereleased]
55
jobs:
66
release:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-go@v2
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-go@v3
1111
with:
12-
go-version: 1.17
12+
go-version-file: go.mod
1313
- run: |
14-
gpg --import <<< "$TERRAFORM_REGISTRY_GPG_PRIVATE_KEY"
14+
printenv TERRAFORM_REGISTRY_GPG_PRIVATE_KEY | gpg --import
1515
env:
1616
TERRAFORM_REGISTRY_GPG_PRIVATE_KEY: ${{ secrets.TERRAFORM_REGISTRY_GPG_PRIVATE_KEY }}
17-
- uses: goreleaser/goreleaser-action@v2
17+
- uses: goreleaser/goreleaser-action@v3
1818
with:
19-
version: latest
20-
args: release --rm-dist
19+
args: release
2120
env:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
GITHUB_TOKEN: ${{ github.token }}
22+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
23+
- run: gh release edit --prerelease=false ${{ github.event.release.tag_name }}
24+
env:
25+
GITHUB_TOKEN: ${{ github.token }}
2326
synchronize:
2427
# Empyrically equivalent to pressing the "Resync" button in the Settings
2528
# page of Terraform Registry, but without bothering humans in the process

.github/workflows/smoke.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ jobs:
3535
GOOGLE_APPLICATION_CREDENTIALS_DATA: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
3636
SMOKE_TEST_ENABLE_${{ matrix.provider }}: true
3737
steps:
38-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v3
3939
with:
4040
ref: ${{ github.event.pull_request.head.sha || github.ref }}
41-
- uses: actions/setup-go@v2
41+
- uses: actions/setup-go@v3
4242
with:
43-
go-version: ^1.17
43+
go-version-file: go.mod
4444
- if: matrix.provider == 'AWS'
4545
uses: aws-actions/configure-aws-credentials@v1
4646
with:
4747
aws-region: us-west-1
4848
role-to-assume: arn:aws:iam::342840881361:role/SandboxUser
4949
- run: go test ./task -v -timeout=30m -count=1 -tags=smoke
5050
- if: always()
51-
uses: actions/checkout@v2
51+
uses: actions/checkout@v3
5252
with:
5353
ref: master
5454
- if: always()
@@ -68,12 +68,12 @@ jobs:
6868
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6969
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
7070
steps:
71-
- uses: actions/checkout@v2
71+
- uses: actions/checkout@v3
7272
with:
7373
ref: ${{ github.event.pull_request.head.sha || github.ref }}
74-
- uses: actions/setup-go@v2
74+
- uses: actions/setup-go@v3
7575
with:
76-
go-version: ^1.17
76+
go-version-file: go.mod
7777
- run: |
7878
az login \
7979
--service-principal \

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
if: github.event_name == 'pull_request'
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v3
2020
- uses: golangci/golangci-lint-action@v2
2121
with:
2222
only-new-issues: true
2323
test:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/setup-go@v2
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-go@v3
2728
with:
28-
go-version: ^1.16
29-
- uses: actions/checkout@v2
29+
go-version-file: go.mod
3030
- run: make build
3131
- run: make test

.goreleaser.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ builds:
1111
- -X main.commit={{.Commit}}
1212
- -X main.date={{.Date}}
1313
goos:
14-
# - freebsd
1514
- windows
1615
- linux
1716
- darwin
@@ -43,15 +42,14 @@ checksum:
4342
signs:
4443
- artifacts: checksum
4544
args:
46-
# if you are using this is a GitHub action or some other automated pipeline, you
47-
# need to pass the batch flag to indicate its not interactive.
4845
- "--batch"
4946
- "--output"
5047
- "${signature}"
5148
- "--detach-sign"
5249
- "${artifact}"
53-
release:
54-
# If you want to manually examine the release before its live, uncomment this line:
55-
# draft: true
5650
changelog:
5751
skip: true
52+
announce:
53+
slack:
54+
enabled: true
55+
message_template: Succesfully released {{ .ProjectName }} {{.Tag}}

go.mod

Lines changed: 167 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
module terraform-provider-iterative
22

3-
go 1.16
3+
go 1.19
44

55
require (
6-
cloud.google.com/go/iam v0.3.0 // indirect
76
github.com/Azure/azure-sdk-for-go v58.1.0+incompatible
87
github.com/Azure/go-autorest/autorest v0.11.18
98
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8
109
github.com/Azure/go-autorest/autorest/to v0.4.0
11-
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
1210
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
1311
github.com/alessio/shellescape v1.4.1
1412
github.com/aohorodnyk/uid v1.1.0
@@ -23,13 +21,11 @@ require (
2321
github.com/brianvoe/gofakeit/v6 v6.9.0
2422
github.com/cloudflare/gokey v0.1.0
2523
github.com/docker/go-units v0.4.0
26-
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 // indirect
24+
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
2725
github.com/gobwas/glob v0.2.3
2826
github.com/google/go-github/v42 v42.0.0
2927
github.com/google/go-github/v45 v45.2.0
3028
github.com/google/uuid v1.3.0
31-
github.com/hashicorp/go-getter v1.5.11 // indirect
32-
github.com/hashicorp/hcl/v2 v2.8.0 // indirect
3329
github.com/hashicorp/terraform-plugin-sdk/v2 v2.8.0
3430
github.com/rclone/rclone v1.57.0
3531
github.com/sebdah/goldie/v2 v2.5.3
@@ -40,7 +36,6 @@ require (
4036
github.com/spf13/viper v1.11.0
4137
github.com/stretchr/testify v1.7.1
4238
github.com/wessie/appdirs v0.0.0-20141031215813-6573e894f8e2
43-
github.com/yusufpapurcu/wmi v1.2.2 // indirect
4439
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
4540
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
4641
google.golang.org/api v0.74.0
@@ -51,3 +46,168 @@ require (
5146
k8s.io/client-go v0.22.3
5247
k8s.io/kubectl v0.22.3
5348
)
49+
50+
require (
51+
cloud.google.com/go v0.100.2 // indirect
52+
cloud.google.com/go/compute v1.5.0 // indirect
53+
cloud.google.com/go/iam v0.3.0 // indirect
54+
cloud.google.com/go/storage v1.14.0 // indirect
55+
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
56+
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
57+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
58+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
59+
github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect
60+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
61+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
62+
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
63+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
64+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
65+
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
66+
github.com/PuerkitoBio/purell v1.1.1 // indirect
67+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
68+
github.com/StackExchange/wmi v1.2.1 // indirect
69+
github.com/aalpar/deheap v0.0.0-20200318053559-9a0c2883bd56 // indirect
70+
github.com/abbot/go-http-auth v0.4.0 // indirect
71+
github.com/agext/levenshtein v1.2.2 // indirect
72+
github.com/apparentlymart/go-textseg/v12 v12.0.0 // indirect
73+
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
74+
github.com/aws/aws-sdk-go v1.40.27 // indirect
75+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 // indirect
76+
github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect
77+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0 // indirect
78+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.0 // indirect
79+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.0 // indirect
80+
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4 // indirect
81+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 // indirect
82+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.0 // indirect
83+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 // indirect
84+
github.com/aws/aws-sdk-go-v2/service/sso v1.4.2 // indirect
85+
github.com/beorn7/perks v1.0.1 // indirect
86+
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
87+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
88+
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
89+
github.com/coreos/go-semver v0.3.0 // indirect
90+
github.com/davecgh/go-spew v1.1.1 // indirect
91+
github.com/dimchansky/utfbom v1.1.1 // indirect
92+
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
93+
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
94+
github.com/fatih/camelcase v1.0.0 // indirect
95+
github.com/fatih/color v1.13.0 // indirect
96+
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
97+
github.com/fsnotify/fsnotify v1.5.1 // indirect
98+
github.com/fvbommel/sortorder v1.0.1 // indirect
99+
github.com/go-errors/errors v1.0.1 // indirect
100+
github.com/go-logr/logr v0.4.0 // indirect
101+
github.com/go-ole/go-ole v1.2.6 // indirect
102+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
103+
github.com/go-openapi/jsonreference v0.19.5 // indirect
104+
github.com/go-openapi/swag v0.19.14 // indirect
105+
github.com/gogo/protobuf v1.3.2 // indirect
106+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
107+
github.com/golang/protobuf v1.5.2 // indirect
108+
github.com/golang/snappy v0.0.3 // indirect
109+
github.com/google/btree v1.0.1 // indirect
110+
github.com/google/go-cmp v0.5.8 // indirect
111+
github.com/google/go-querystring v1.1.0 // indirect
112+
github.com/google/gofuzz v1.1.0 // indirect
113+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
114+
github.com/googleapis/gax-go/v2 v2.3.0 // indirect
115+
github.com/googleapis/gnostic v0.5.5 // indirect
116+
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
117+
github.com/hashicorp/errwrap v1.0.0 // indirect
118+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
119+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
120+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
121+
github.com/hashicorp/go-getter v1.5.11 // indirect
122+
github.com/hashicorp/go-hclog v1.2.0 // indirect
123+
github.com/hashicorp/go-multierror v1.0.0 // indirect
124+
github.com/hashicorp/go-plugin v1.4.1 // indirect
125+
github.com/hashicorp/go-safetemp v1.0.0 // indirect
126+
github.com/hashicorp/go-uuid v1.0.2 // indirect
127+
github.com/hashicorp/go-version v1.3.0 // indirect
128+
github.com/hashicorp/hcl v1.0.0 // indirect
129+
github.com/hashicorp/hcl/v2 v2.8.0 // indirect
130+
github.com/hashicorp/logutils v1.0.0 // indirect
131+
github.com/hashicorp/terraform-exec v0.14.0 // indirect
132+
github.com/hashicorp/terraform-json v0.12.0 // indirect
133+
github.com/hashicorp/terraform-plugin-go v0.4.0 // indirect
134+
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
135+
github.com/imdario/mergo v0.3.12 // indirect
136+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
137+
github.com/jmespath/go-jmespath v0.4.0 // indirect
138+
github.com/josharian/intern v1.0.0 // indirect
139+
github.com/json-iterator/go v1.1.12 // indirect
140+
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 // indirect
141+
github.com/klauspost/compress v1.13.4 // indirect
142+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
143+
github.com/lithammer/dedent v1.1.0 // indirect
144+
github.com/magiconair/properties v1.8.6 // indirect
145+
github.com/mailru/easyjson v0.7.6 // indirect
146+
github.com/mattn/go-colorable v0.1.12 // indirect
147+
github.com/mattn/go-ieproxy v0.0.1 // indirect
148+
github.com/mattn/go-isatty v0.0.14 // indirect
149+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
150+
github.com/mitchellh/copystructure v1.2.0 // indirect
151+
github.com/mitchellh/go-homedir v1.1.0 // indirect
152+
github.com/mitchellh/go-testing-interface v1.0.4 // indirect
153+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
154+
github.com/mitchellh/mapstructure v1.4.3 // indirect
155+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
156+
github.com/moby/spdystream v0.2.0 // indirect
157+
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
158+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
159+
github.com/modern-go/reflect2 v1.0.2 // indirect
160+
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
161+
github.com/ncw/swift/v2 v2.0.1 // indirect
162+
github.com/oklog/run v1.0.0 // indirect
163+
github.com/pelletier/go-toml v1.9.4 // indirect
164+
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
165+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
166+
github.com/pkg/errors v0.9.1 // indirect
167+
github.com/pmezard/go-difflib v1.0.0 // indirect
168+
github.com/prometheus/client_golang v1.11.0 // indirect
169+
github.com/prometheus/client_model v0.2.0 // indirect
170+
github.com/prometheus/common v0.30.0 // indirect
171+
github.com/prometheus/procfs v0.7.3 // indirect
172+
github.com/rfjakob/eme v1.1.2 // indirect
173+
github.com/russross/blackfriday v1.5.2 // indirect
174+
github.com/sergi/go-diff v1.2.0 // indirect
175+
github.com/shirou/gopsutil/v3 v3.21.8 // indirect
176+
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
177+
github.com/spf13/afero v1.8.2 // indirect
178+
github.com/spf13/cast v1.4.1 // indirect
179+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
180+
github.com/subosito/gotenv v1.2.0 // indirect
181+
github.com/tklauser/go-sysconf v0.3.9 // indirect
182+
github.com/tklauser/numcpus v0.3.0 // indirect
183+
github.com/ulikunitz/xz v0.5.8 // indirect
184+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
185+
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
186+
github.com/yusufpapurcu/wmi v1.2.2 // indirect
187+
github.com/zclconf/go-cty v1.8.4 // indirect
188+
go.opencensus.io v0.23.0 // indirect
189+
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
190+
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
191+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
192+
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
193+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
194+
golang.org/x/text v0.3.7 // indirect
195+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
196+
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
197+
google.golang.org/appengine v1.6.7 // indirect
198+
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
199+
google.golang.org/grpc v1.45.0 // indirect
200+
google.golang.org/protobuf v1.28.0 // indirect
201+
gopkg.in/inf.v0 v0.9.1 // indirect
202+
gopkg.in/ini.v1 v1.66.4 // indirect
203+
gopkg.in/yaml.v2 v2.4.0 // indirect
204+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
205+
k8s.io/component-base v0.22.3 // indirect
206+
k8s.io/klog/v2 v2.9.0 // indirect
207+
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
208+
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect
209+
sigs.k8s.io/kustomize/api v0.8.11 // indirect
210+
sigs.k8s.io/kustomize/kyaml v0.11.0 // indirect
211+
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
212+
sigs.k8s.io/yaml v1.2.0 // indirect
213+
)

0 commit comments

Comments
 (0)