-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (62 loc) · 1.49 KB
/
ci.yml
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
name: ci
on:
push:
paths-ignore:
- 'README.md'
tags-ignore:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- "*"
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- 'README.md'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Unshallow
run: git fetch --prune --unshallow --tags
- name: build
run: make build
- name: test
run: make test_view
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: cover.html
reviewdog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version_file: go.mod
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: error
filter_mode: nofilter
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: true