Skip to content

Commit

Permalink
ci: add go lint checks job
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Nov 5, 2024
1 parent 493630e commit 525f3d0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,36 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5

- name: Go Format
run: gofmt -s -w . && git diff --exit-code

- name: Go Vet
run: go vet

- name: Go Tidy
run: go mod tidy && git diff --exit-code

- name: Go Mod
run: go mod download

- name: Go Mod Verify
run: go mod verify

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest

- name: Run govulncheck
run: govulncheck

build-and-push-image:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down Expand Up @@ -54,6 +83,7 @@ jobs:
annotations: ${{ steps.meta.outputs.annotations }}

releases-matrix:
needs: lint
permissions:
contents: write
name: Release Go Binaries
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github_exporter

go 1.22.7
go 1.23

require github.com/google/go-github/v66 v66.0.0

Expand Down

0 comments on commit 525f3d0

Please sign in to comment.