Skip to content

Commit 2a1af75

Browse files
committed
Add GitHub actions test workflow
1 parent e6b203c commit 2a1af75

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
env:
12+
GOPROXY: https://proxy.golang.org/
13+
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
timeout-minutes: 10
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os:
22+
- ubuntu-latest
23+
- macos-latest
24+
go:
25+
- 1.16
26+
- 1.17
27+
- 1.18
28+
- 1.19
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # https://github.com/actions/checkout/releases/tag/v3.3.0
32+
- name: Set up Go
33+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # https://github.com/actions/setup-go/releases/tag/v3.5.0
34+
with:
35+
go-version: ${{ matrix.go }}
36+
- name: Go mod download
37+
run: go mod download -x
38+
- name: Go mod verify
39+
run: go mod verify
40+
- name: Run tests
41+
run: go test -v ./...

0 commit comments

Comments
 (0)