Skip to content

Commit c76b533

Browse files
authored
Update go.yml
1 parent 6644bc6 commit c76b533

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

.github/workflows/go.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
name: Go
2-
3-
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
8-
1+
# Based on https://github.com/mvdan/github-actions-golang
2+
on: [push, pull_request, workflow_dispatch]
3+
name: Tests
94
jobs:
10-
11-
build:
5+
test:
6+
strategy:
7+
matrix:
8+
go-version: ['1.22.x', '1.23.x', '1.24.x']
9+
os: [ubuntu-latest, macos-latest, windows-latest]
10+
runs-on: ${{ matrix.os }}
11+
steps:
12+
- uses: actions/setup-go@v4
13+
with:
14+
go-version: ${{ matrix.go-version }}
15+
- uses: actions/checkout@v3
16+
- run: go test -v ./...
17+
gocritic:
1218
runs-on: ubuntu-latest
1319
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Set up Go
17-
uses: actions/setup-go@v2
18-
with:
19-
go-version: 1.19
20-
21-
- name: Test
22-
run: go test -v ./...
20+
- uses: actions/setup-go@v4
21+
- uses: actions/checkout@v3
22+
- run: |
23+
go install github.com/go-critic/go-critic/cmd/gocritic@latest
24+
gocritic check .

0 commit comments

Comments
 (0)