-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: rogerogers <[email protected]>
- Loading branch information
1 parent
9c26ea9
commit 886ef00
Showing
5 changed files
with
70 additions
and
89 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,28 +3,32 @@ name: Tests | |
on: [push, pull_request] | ||
|
||
jobs: | ||
lint-and-ut: | ||
runs-on: self-hosted | ||
unit-benchmark-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.18 | ||
go-version: stable | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Unit Test | ||
run: go test -race -covermode=atomic -coverprofile=coverage.out ./... | ||
|
||
- name: Lint | ||
run: | | ||
go vet -stdmethods=false $(go list ./...) | ||
go install mvdan.cc/[email protected] | ||
test -z "$(gofumpt -l -extra .)" | ||
- name: Benchmark | ||
run: go test -bench=. -benchmem -run=none ./... | ||
|
||
compatibility-test: | ||
strategy: | ||
matrix: | ||
go: ["1.19", "1.20", "1.21", "1.22"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: true # don't use cache for self-hosted runners | ||
- name: Unit Test | ||
run: go test -race -covermode=atomic -coverprofile=coverage.out ./... | ||
run: go test -race -covermode=atomic ./... |
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
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