-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on input from golang/go#42119
- Loading branch information
Showing
1 changed file
with
17 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ name: Build and test | |
permissions: | ||
contents: write | ||
jobs: | ||
go_generate: | ||
generated: | ||
name: Check generated code is up to date | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -13,13 +13,14 @@ jobs: | |
uses: WillAbides/[email protected] | ||
with: | ||
go-version-file: go.mod | ||
- name: go mod tidy | ||
run: | | ||
go mod tidy | ||
git diff --exit-code | ||
- name: go generate | ||
env: | ||
GO111MODULE: 'on' | ||
GOPATH: ${{ github.workspace }}/go | ||
run: go generate -x | ||
- name: Diff after go generate | ||
run: git diff --exit-code | ||
run: | | ||
go generate -x | ||
git diff --exit-code | ||
build_and_test: | ||
name: Build and test | ||
runs-on: ubuntu-22.04 | ||
|
@@ -32,13 +33,19 @@ jobs: | |
with: | ||
go-version-file: go.mod | ||
- name: go version | ||
env: | ||
GO111MODULE: 'on' | ||
run: go version | ||
- name: go mod verify | ||
run: go mod verify | ||
- name: go vet | ||
run: go vet ./... | ||
- name: go fmt ./.. | ||
run: | | ||
go fmt ./... | ||
git diff --exit-code | ||
- name: Test | ||
uses: robherley/[email protected] | ||
with: | ||
testArguments: -race -cover -covermode=atomic -coverprofile=coverage.txt ./... | ||
testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./... | ||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v4 | ||
- name: Install changelog management tool | ||
|