Skip to content

Commit de8b809

Browse files
authored
Merge pull request #15 from gostaticanalysis/ci-github
github/workflows: add test GHA
2 parents c7b0c31 + 77fd1c4 commit de8b809

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- "*"
10+
release:
11+
types:
12+
- published
13+
- created
14+
- edited
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-20.04
23+
24+
steps:
25+
- name: Install Go
26+
uses: actions/setup-go@v2
27+
with:
28+
go-version: 1.15.x
29+
30+
- name: Checkout code
31+
uses: actions/checkout@v2
32+
33+
- name: Cache Go module and build cache
34+
uses: actions/cache@v2
35+
with:
36+
key: go-${{ hashFiles('**/go.sum') }}
37+
path: |
38+
~/go/pkg/mod
39+
restore-keys: |
40+
go-
41+
42+
- name: Test and vet
43+
run: |
44+
go vet ./...
45+
go test -v -race ./...

0 commit comments

Comments
 (0)