-
Notifications
You must be signed in to change notification settings - Fork 16
46 lines (40 loc) · 1.13 KB
/
codecheck.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
name: CodeCheck
on:
pull_request:
paths:
- 'go.mod'
- '**.go'
- '**.yml'
push:
paths:
- '**.go'
- 'go.mod'
- '**.yml'
jobs:
test:
name: Static check and lint check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go Faster
uses: WillAbides/[email protected]
timeout-minutes: 3
with:
go-version: "1.21"
- name: Revive lint check
uses: docker://morphy/revive-action:v2.5.5
with:
# Exclude patterns, separated by semicolons (optional)
exclude: "./_examples/...;./testdata/..."
- name: Run static check
uses: reviewdog/action-staticcheck@v1
if: ${{ github.event_name == 'pull_request'}}
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-check
# Report all results. [added,diff_context,file,nofilter].
filter_mode: added
# Exit with 1 when it find at least one finding.
fail_on_error: true