File tree Expand file tree Collapse file tree 5 files changed +20
-35
lines changed Expand file tree Collapse file tree 5 files changed +20
-35
lines changed Original file line number Diff line number Diff line change 14
14
runs-on : ubuntu-latest
15
15
steps :
16
16
- uses : actions/checkout@v3
17
- - id : go-version
18
- # Reference: https://github.com/actions/setup-go/issues/23
19
- run : echo "::set-output name=version::$(cat ./.go-version)"
20
17
- uses : actions/setup-go@v3
21
18
with :
22
- go-version : ${{ steps.go-version.outputs.version }}
19
+ go-version-file : ' go.mod '
23
20
- run : go install github.com/rhysd/actionlint/cmd/actionlint@latest
24
21
- run : actionlint
Original file line number Diff line number Diff line change 21
21
with :
22
22
go-version-file : ' go.mod'
23
23
- run : go mod download
24
- -
uses :
golangci/[email protected]
25
- with :
26
- skip-go-installation : true
27
- terraform-provider-corner :
28
- defaults :
29
- run :
30
- working-directory : terraform-provider-corner
31
- runs-on : ubuntu-latest
32
- steps :
33
- - uses : actions/checkout@v3
34
- - uses : actions/checkout@v3
35
- with :
36
- path : terraform-provider-corner
37
- repository : hashicorp/terraform-provider-corner
38
- - uses : actions/setup-go@v3
39
- with :
40
- go-version-file : ' go.mod'
41
- - run : go mod edit -replace=github.com/hashicorp/terraform-plugin-framework-validators=../
42
- - run : go mod tidy
43
- - run : go test -v ./internal/frameworkprovider
24
+ - uses : golangci/golangci-lint-action@v3
25
+
44
26
test :
45
27
name : test (Go v${{ matrix.go-version }})
46
28
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 14
14
runs-on : ubuntu-latest
15
15
steps :
16
16
- uses : actions/checkout@v3
17
- - id : go-version
18
- # Reference: https://github.com/actions/setup-go/issues/23
19
- run : echo "::set-output name=version::$(cat ./.go-version)"
20
17
- uses : actions/setup-go@v3
21
18
with :
22
- go-version : ${{ steps.go-version.outputs.version }}
19
+ go-version-file : ' go.mod '
23
20
- uses : goreleaser/goreleaser-action@v3
24
21
with :
25
22
args : check
Original file line number Diff line number Diff line change 16
16
runs-on : ubuntu-latest
17
17
steps :
18
18
- uses : actions/checkout@v3
19
- with :
20
- # Required for release notes
21
- fetch-depth : 0
22
- - id : go-version
23
- # Reference: https://github.com/actions/setup-go/issues/23
24
- run : echo "::set-output name=version::$(cat ./.go-version)"
25
19
- uses : actions/setup-go@v3
26
20
with :
27
- go-version : ${{ steps.go-version.outputs.version }}
21
+ go-version-file : ' go.mod '
28
22
- name : Generate Release Notes
29
23
# Fetch CHANGELOG.md contents up to Git tag prior to this release, skipping top two lines
30
24
run : sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > /tmp/release-notes.txt
Original file line number Diff line number Diff line change
1
+ default : build
2
+
3
+ build :
4
+ go build -v ./...
5
+
6
+ lint :
7
+ golangci-lint run
8
+
9
+ fmt :
10
+ gofmt -s -w -e .
11
+
12
+ test :
13
+ go test -v -cover -timeout=120s -parallel=4 ./...
14
+
15
+ .PHONY : build lint fmt test
You can’t perform that action at this time.
0 commit comments