Skip to content

Commit

Permalink
add: checks.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinHood3082 committed Oct 20, 2024
1 parent a6fa748 commit a4f44af
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run checks

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read # to fetch code (actions/checkout)

env:
# run static analysis only with the latest Go version
LATEST_GO_VERSION: "1.23"

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
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 ./...

0 comments on commit a4f44af

Please sign in to comment.