Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: CI
2
3 on:
4 push:
5 branches: [master]
6 tags: ['v*']
7 pull_request:
8 branches: ['*']
9
10 permissions:
11 contents: read
12
13 jobs:
14
15 test:
16 runs-on: ubuntu-latest
17 strategy:
18 matrix:
19 go: ["1.20.x", "1.21.x"]
20
21 steps:
22 - name: Checkout code
23 uses: actions/checkout@v3
24 - name: Setup Go
25 uses: actions/setup-go@v4
26 with:
27 go-version: ${{ matrix.go }}
28
29 - name: Test
30 run: make cover
31
32 - name: Upload coverage to codecov.io
33 uses: codecov/codecov-action@v3
34
35 lint:
36 name: Lint
37 runs-on: ubuntu-latest
38
39 steps:
40 - uses: actions/checkout@v4
41 name: Check out repository
42 - uses: actions/setup-go@v4
43 name: Set up Go
44 with:
45 go-version: 1.21.x
46 cache: false # managed by golangci-lint
47
48 - uses: golangci/golangci-lint-action@v3
49 name: Install golangci-lint
50 with:
51 version: latest
52 args: --version # make lint will run the linter
53
54 - run: make lint
55 name: Lint