-
Notifications
You must be signed in to change notification settings - Fork 1.4k
39 lines (37 loc) · 976 Bytes
/
check.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
name: check
on:
pull_request:
branches: [ master ]
jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
# Set up GOPATH
- name: set up
uses: actions/setup-go@v5
with:
go-version: '1.22'
id: go
# Check out this repository
- name: checkout
uses: actions/checkout@v4
# Store cache
- name: cache
uses: actions/cache@v4.0.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Run golangci-lint using reviewdog
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
level: warning
golangci_lint_flags: "--config=.github/.golangci.yml"
reporter: github-pr-review
# Run test
- name: test
run: go test -cover ./...