Merge pull request #7 from dj95/dependabot/go_modules/golang.org/x/ne… #46
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
name: Go | |
on: [push] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: Get dependencies | |
run: | | |
go mod vendor | |
- name: Unit-Tests | |
run: | | |
# create the report directory | |
mkdir -p report/ | |
# run the unit tests | |
go test -v -short -covermode=count -coverprofile report/cover.out `go list ./...` | |
- name: Lint | |
run: | | |
# run the linter | |
go vet `go list ./...` | |
- name: Staticcheck | |
run: | | |
# install staticcheck | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
# add the GOBIN to the path | |
export PATH="$PATH:$( go env GOPATH )/bin" | |
# run staticcheck on the source code | |
staticcheck `go list ./...` |