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 1414 runs-on : ubuntu-latest
1515 steps :
1616 - 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)"
2017 - uses : actions/setup-go@v3
2118 with :
22- go-version : ${{ steps.go-version.outputs.version }}
19+ go-version-file : ' go.mod '
2320 - run : go install github.com/rhysd/actionlint/cmd/actionlint@latest
2421 - run : actionlint
Original file line number Diff line number Diff line change 2121 with :
2222 go-version-file : ' go.mod'
2323 - 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+
4426 test :
4527 name : test (Go v${{ matrix.go-version }})
4628 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1414 runs-on : ubuntu-latest
1515 steps :
1616 - 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)"
2017 - uses : actions/setup-go@v3
2118 with :
22- go-version : ${{ steps.go-version.outputs.version }}
19+ go-version-file : ' go.mod '
2320 - uses : goreleaser/goreleaser-action@v3
2421 with :
2522 args : check
Original file line number Diff line number Diff line change 1616 runs-on : ubuntu-latest
1717 steps :
1818 - 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)"
2519 - uses : actions/setup-go@v3
2620 with :
27- go-version : ${{ steps.go-version.outputs.version }}
21+ go-version-file : ' go.mod '
2822 - name : Generate Release Notes
2923 # Fetch CHANGELOG.md contents up to Git tag prior to this release, skipping top two lines
3024 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