-
Notifications
You must be signed in to change notification settings - Fork 3
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: p4u <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
11 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 |
---|---|---|
|
@@ -8,29 +8,24 @@ jobs: | |
go-tests: | ||
runs-on: self-hosted | ||
container: | ||
image: golang:1.16.5 | ||
image: golang:1.22.2 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Lint | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 | ||
$(go env GOPATH)/bin/golangci-lint run --timeout=5m -c .golangci.yml | ||
- name: Go test | ||
run: | | ||
# we run vet in another step | ||
go test -vet=off -timeout=1m ./... | ||
# -race can easily make the crypto stuff 10x slower | ||
go test -vet=off -timeout=15m -race -covermode atomic -coverprofile=covprofile ./... | ||
- name: Go analyze | ||
- name: Run staticcheck | ||
run: | | ||
diff -u <(echo -n) <(gofmt -s -d $(git ls-files '*.go')) | ||
go vet ./... | ||
curl -L https://github.com/dominikh/go-tools/releases/download/2021.1/staticcheck_linux_amd64.tar.gz | tar -xzf - | ||
./staticcheck/staticcheck ./... | ||
go install honnef.co/go/tools/cmd/[email protected] | ||
staticcheck -debug.version | ||
staticcheck ./... | ||