2019-08-16 03:24:31 +02:00
|
|
|
name: Test
|
2019-10-25 04:25:06 +02:00
|
|
|
on: [push, pull_request]
|
2019-08-16 03:24:31 +02:00
|
|
|
jobs:
|
2019-10-25 04:25:06 +02:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-09-05 02:04:40 +02:00
|
|
|
go-version: [1.16.x, 1.17.x]
|
2019-10-25 04:25:06 +02:00
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{matrix.platform}}
|
2019-08-16 03:24:31 +02:00
|
|
|
steps:
|
2019-10-25 04:25:06 +02:00
|
|
|
- name: Set up Go ${{matrix.go-version}}
|
2021-12-20 03:06:51 +02:00
|
|
|
uses: actions/setup-go@v2
|
2019-08-16 03:24:31 +02:00
|
|
|
with:
|
2019-10-25 04:25:06 +02:00
|
|
|
go-version: ${{matrix.go-version}}
|
2019-08-16 03:24:31 +02:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
2021-12-20 03:06:51 +02:00
|
|
|
uses: actions/checkout@v2
|
2019-08-16 03:24:31 +02:00
|
|
|
|
2019-10-25 04:25:06 +02:00
|
|
|
- name: Download Go modules
|
|
|
|
run: go mod download
|
|
|
|
env:
|
|
|
|
GOPROXY: https://proxy.golang.org
|
2019-08-16 03:24:31 +02:00
|
|
|
|
|
|
|
- name: Build
|
2019-10-25 04:25:06 +02:00
|
|
|
run: go build -o ./bin/task -v ./cmd/task
|
2019-08-16 03:28:55 +02:00
|
|
|
|
|
|
|
- name: Test
|
2019-10-25 04:25:06 +02:00
|
|
|
run: ./bin/task test
|