2020-08-23 05:00:42 +00:00
|
|
|
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-11-07 05:11:57 +00:00
|
|
|
go-version: [~1.13, ^1]
|
2020-08-23 05:00:42 +00:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
2023-03-16 03:02:47 +00:00
|
|
|
uses: actions/setup-go@v4
|
2020-08-23 05:00:42 +00:00
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
|
|
|
|
- name: Checkout code
|
2022-11-15 16:08:46 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-08-23 05:00:42 +00:00
|
|
|
|
|
|
|
- name: Download Go modules
|
|
|
|
run: go mod download
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: go test ./...
|