2019-09-15 20:50:52 +08:00
|
|
|
name: Build
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
2019-10-21 14:16:49 +08:00
|
|
|
- name: Set up Go
|
2019-09-15 20:50:52 +08:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: go test -v .
|
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [test]
|
|
|
|
steps:
|
|
|
|
|
2019-10-21 14:16:49 +08:00
|
|
|
- name: Set up Go
|
2019-09-15 20:50:52 +08:00
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v .
|