-
Notifications
You must be signed in to change notification settings - Fork 333
94 lines (79 loc) · 2.26 KB
/
Copy pathvectorlint.yml
File metadata and controls
94 lines (79 loc) · 2.26 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Vector Lint
permissions:
contents: read
on:
push:
pull_request:
jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: geomys/sandboxed-step@v1.2.2
with:
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./...
env: GOEXPERIMENT=jsonv2
gostaticcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: geomys/sandboxed-step@v1.2.2
with:
run: go run honnef.co/go/tools/cmd/staticcheck@latest ./...
env: GOEXPERIMENT=jsonv2
golint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Check if modules are tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain go.mod go.sum)" ]; then
echo "go.mod or go.sum are not tidy. Please run 'go mod tidy' locally and commit changes."
git diff go.mod go.sum
exit 1
fi
- name: Verify Go formatting
# 'gofmt -l .' to list files whose formatting differs from gofmt's
# 'test -z' to verify that the output is empty
run: test -z "$(gofmt -l .)"
vectorlint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Verify JSON formatting
env:
GOEXPERIMENT: jsonv2
run: go run ./tools/vectorgen fmt --check 'testvectors_v1/*.json'
- name: Run vectorgen lint
env:
GOEXPERIMENT: jsonv2
run: go run ./tools/vectorgen lint
- name: Run twistcheck
run: go run ./tools/twistcheck
- name: Run schemagen
run: go run ./tools/schemagen