-
Notifications
You must be signed in to change notification settings - Fork 26
77 lines (73 loc) · 1.92 KB
/
generator.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Client Generator
on: [push]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23' ]
defaults:
run:
working-directory: generator
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- run: go mod tidy
- run: go test ./...
lint:
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23' ]
defaults:
run:
working-directory: generator
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- run: go mod tidy
- run: go fmt ./...
- run: go vet ./...
- run: |
# unparam does not seem to have releases. Using `latest` sounds risky.
go get mvdan.cc/unparam@57a3b4290ba3724102fdbbe72314f2b782d4bef5
go run mvdan.cc/unparam ./...
- name: Run `staticcheck`
uses: dominikh/[email protected]
with:
install-go: false
cache-key: ${{ matrix.go-version }}
working-directory: generator
- name: Detect Changes
run: git diff --exit-code
vuln:
runs-on: ubuntu-24.04
strategy:
matrix:
go-version: [ '1.23' ]
defaults:
run:
working-directory: generator
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: |
generator/go.sum
- name: Display Go version
run: go version
- run: |
go get golang.org/x/vuln/cmd/[email protected]
go run golang.org/x/vuln/cmd/govulncheck ./...