File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Dependency Audit
2+
3+ on :
4+ push :
5+ branches :
6+ - ' main'
7+ pull_request :
8+ branches :
9+ - ' main'
10+ schedule :
11+ # Run weekly on Monday at 06:00 UTC
12+ - cron : ' 0 6 * * 1'
13+
14+ jobs :
15+ govulncheck :
16+ name : Check for known vulnerabilities
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v6
20+
21+ - uses : actions/setup-go@v6
22+ with :
23+ go-version-file : ' ./go.mod'
24+
25+ - name : Install govulncheck
26+ run : go install golang.org/x/vuln/cmd/govulncheck@latest
27+
28+ - name : Run govulncheck
29+ run : govulncheck ./...
30+
31+ go-mod-tidy :
32+ name : Verify go.mod / go.sum are tidy
33+ runs-on : ubuntu-latest
34+ steps :
35+ - uses : actions/checkout@v6
36+
37+ - uses : actions/setup-go@v6
38+ with :
39+ go-version-file : ' ./go.mod'
40+
41+ - name : Run go mod tidy
42+ run : go mod tidy
43+
44+ - name : Check for uncommitted changes
45+ run : |
46+ if [ -n "$(git status --porcelain go.mod go.sum)" ]; then
47+ echo "::error::go.mod or go.sum are not tidy. Run 'go mod tidy' and commit the changes."
48+ git diff go.mod go.sum
49+ exit 1
50+ fi
51+
Original file line number Diff line number Diff line change 1- name : Test
1+ name : Test & Lint
22
33on :
44 push :
3737 github_token : ${{ secrets.github_token }}
3838 reporter : github-pr-review
3939 filter_mode : nofilter
40- fail_on_error : true
40+ fail_on_error : true
41+
42+ golangci-lint :
43+ name : Run golangci-lint
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v6
47+
48+ - uses : actions/setup-go@v6
49+ with :
50+ go-version-file : ' ./go.mod'
51+
52+ - uses : golangci/golangci-lint-action@v7
53+ with :
54+ version : latest
You can’t perform that action at this time.
0 commit comments