Skip to content

Commit 0004e25

Browse files
committed
Create .github\workflows\go.yml
1 parent 71e2027 commit 0004e25

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/go.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Go
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
name: Build
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Set up Go 1.13
9+
uses: actions/setup-go@v1
10+
with:
11+
go-version: 1.13
12+
id: go
13+
14+
- name: Check out code into the Go module directory
15+
uses: actions/checkout@v2
16+
17+
- name: Get dependencies
18+
run: |
19+
go get -v -t -d ./...
20+
if [ -f Gopkg.toml ]; then
21+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
22+
dep ensure
23+
fi
24+
25+
- name: Build
26+
run: go build -v .
27+
test:
28+
name: Test
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Set up Go 1.13
32+
uses: actions/setup-go@v1
33+
with:
34+
go-version: 1.13
35+
id: go
36+
37+
- name: Check out code into the Go module directory
38+
uses: actions/checkout@v2
39+
40+
- name: Get dependencies
41+
run: |
42+
go get -v -t -d ./...
43+
if [ -f Gopkg.toml ]; then
44+
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
45+
dep ensure
46+
fi
47+
48+
- name: Test
49+
run: go test -v ./...

0 commit comments

Comments
 (0)