Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 000792a

Browse files
authored
test out GH actions (#508)
1 parent 1fe605d commit 000792a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run tests
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
env:
8+
GO111MODULE: on
9+
jobs:
10+
test:
11+
strategy:
12+
matrix:
13+
go-version: [1.11.x, 1.15.x]
14+
os: [ubuntu-latest]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
18+
- name: Install Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Vet and build
27+
run: |
28+
go vet ./...
29+
go build ./...
30+
31+
- name: Install tools
32+
run: |
33+
go install github.com/golang/mock/mockgen
34+
GO111MODULE=off go get -u golang.org/x/lint/golint
35+
36+
- name: Run test scripts
37+
run: |
38+
./ci/check_go_fmt.sh
39+
./ci/check_go_lint.sh
40+
./ci/check_go_generate.sh
41+
./ci/check_go_mod.sh
42+
./ci/check_panic_handling.sh
43+
44+
- name: Run Go tests
45+
run: go test -v ./...

0 commit comments

Comments
 (0)