2019-08-16 03:24:31 +02:00
|
|
|
name: Test
|
2022-05-15 02:00:15 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2019-08-16 03:24:31 +02:00
|
|
|
jobs:
|
2019-10-25 04:25:06 +02:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-08-04 01:49:46 +02:00
|
|
|
go-version: [1.18.x, 1.19.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}}
|
2022-05-15 02:00:15 +02:00
|
|
|
uses: actions/setup-go@v3
|
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
|
2022-05-15 02:00:15 +02:00
|
|
|
uses: actions/checkout@v3
|
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
|
2022-01-14 02:11:47 +02:00
|
|
|
run: ./bin/task test --output=group --output-group-begin='::group::{{.TASK}}' --output-group-end='::endgroup::'
|