2019-12-31 11:23:31 +00:00
|
|
|
name: build
|
2019-12-31 11:15:57 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-10-23 11:04:22 +00:00
|
|
|
go-version: [~1.13, ^1]
|
2020-10-18 16:11:29 +00:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-01-08 21:00:11 +00:00
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
2019-12-31 11:15:57 +00:00
|
|
|
steps:
|
2020-10-18 16:11:29 +00:00
|
|
|
- name: Install Go
|
2020-10-23 11:04:22 +00:00
|
|
|
uses: actions/setup-go@v2
|
2020-10-18 16:11:29 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
2020-05-26 20:22:52 +00:00
|
|
|
|
2020-10-18 16:11:29 +00:00
|
|
|
- name: Checkout code
|
2020-10-19 04:15:02 +00:00
|
|
|
uses: actions/checkout@v2
|
2019-12-31 11:15:57 +00:00
|
|
|
|
2020-10-18 16:11:29 +00:00
|
|
|
- name: Download Go modules
|
|
|
|
run: go mod download
|
2019-12-31 11:15:57 +00:00
|
|
|
|
2020-10-18 16:11:29 +00:00
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
2019-12-31 11:15:57 +00:00
|
|
|
|
2020-10-18 16:11:29 +00:00
|
|
|
- name: Test
|
|
|
|
run: go test ./...
|