-
-
Notifications
You must be signed in to change notification settings - Fork 12
49 lines (38 loc) · 1.02 KB
/
ci.yml
File metadata and controls
49 lines (38 loc) · 1.02 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
name: CI
on:
push:
branches-ignore:
- "dependabot/**" # Skip dependabot branches (they create PRs)
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache: true
- name: Install tools
run: make install-tools
- name: Format check
run: make fmt-check
- name: Lint
run: make lint
- name: Test
run: go test -race -coverprofile=coverage.txt -timeout=2m ./...
- name: Upload coverage to Codecov
if: github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.txt
fail_ci_if_error: false
- name: Vulncheck
run: make vuln