2022-12-13 10:38:20 +02:00
|
|
|
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 only with the latest Go version
|
2024-02-07 07:23:31 +02:00
|
|
|
LATEST_GO_VERSION: "1.22"
|
2022-12-13 10:38:20 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
2024-01-28 17:16:51 +02:00
|
|
|
uses: actions/checkout@v4
|
2022-12-13 10:38:20 +02:00
|
|
|
|
|
|
|
- name: Set up Go ${{ matrix.go }}
|
2024-01-28 17:16:51 +02:00
|
|
|
uses: actions/setup-go@v5
|
2022-12-13 10:38:20 +02:00
|
|
|
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 ./...
|
|
|
|
|
|
|
|
|