-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (47 loc) · 1.27 KB
/
Copy pathcounters.yaml
File metadata and controls
56 lines (47 loc) · 1.27 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
50
51
52
53
54
55
56
name: counters
on:
push:
paths:
- 'counters/**'
pull_request:
paths:
- 'counters/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Install deps
working-directory: counters
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go get -t work
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest
- name: Run linters
working-directory: counters
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
$(exit $(go fmt work | wc -l))
go vet work
staticcheck work
find . -type f -name "*.go" | xargs misspell -error -locale US
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Run tests
working-directory: counters
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go test -v -count=1 work