-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 925 Bytes
/
Copy pathtests.yml
File metadata and controls
48 lines (39 loc) · 925 Bytes
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
name: tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
test:
runs-on: ubuntu-24.04
env:
GOTOOLCHAIN: local
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26"
cache: true
- name: Format check
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "gofmt needed for:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11.4
- name: Run tests
run: go test -race -v ./...
- name: Module tidy check
run: go mod tidy -diff
- name: Module verify
run: go mod verify