Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
40 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Run checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
env: | ||
# run static analysis, coverage and benchmarks only with the latest Go version | ||
LATEST_GO_VERSION: 1.19 | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go ${{ matrix.go }} | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.LATEST_GO_VERSION }} | ||
check-latest: true | ||
|
||
- name: Run golint | ||
run: | | ||
go install golang.org/x/lint/golint@latest | ||
golint -set_exit_status ./... | ||
- name: Run staticcheck | ||
run: | | ||
go install honnef.co/go/tools/cmd/staticcheck@latest | ||
staticcheck ./... | ||
- name: Run govulncheck | ||
run: | | ||
go version | ||
go install golang.org/x/vuln/cmd/govulncheck@latest | ||
govulncheck ./... | ||
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