Repository navigation
58 lines (45 loc) · 1.41 KB
/
Copy pathci.yml
File metadata and controls
58 lines (45 loc) · 1.41 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
name: Coding Agent Loop CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ci:
name: Lint, test, analyze and build
# One job, so checkout, Go setup, the cache restore and make config happen
# once instead of once per check.
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# go-version wins over go-version-file. 1.26.7 is newer than go.mod's
# go line, so govulncheck checks a patched standard library, and every
# step uses the same toolchain.
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
go-version: "1.26.7"
cache: ${{ !env.ACT }}
- name: Make config
run: make config
- name: Lint
run: make lint
- name: Install staticcheck and govulncheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run staticcheck
run: make staticcheck
- name: Run govulncheck
run: make vulcheck
- name: Test
run: make test
- name: Build
run: make build