-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 1.75 KB
/
pull_request.yaml
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
66
67
68
69
70
name: Pull Request Workflow
on:
pull_request:
jobs:
test:
name: test job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/cache@v3
name: Cache Go Modules
id: cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go Modules
if: steps.cache.outputs.cache-hit != 'true'
run: go mod download
- name: Run tests
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
- uses: codecov/codecov-action@v4
golangci-lint:
name: golangci-lint job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--enable-all --exclude-use-default=false"
level: warning
reporter: github-pr-review
fail_on_error: true
languagetool:
name: languagetool job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-languagetool@v1
with:
reporter: github-pr-review
level: info
shellcheck:
name: shellcheck job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-shellcheck@v1
with:
reporter: github-pr-review
level: warning
fail_on_error: true
alex:
name: alex job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-alex@v1
with:
reporter: github-pr-review
level: info