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:
|
2023-04-15 21:39:35 +02:00
|
|
|
- main
|
2022-05-15 02:00:15 +02:00
|
|
|
|
2019-08-16 03:24:31 +02:00
|
|
|
jobs:
|
2019-10-25 04:25:06 +02:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-08-11 23:46:37 +02:00
|
|
|
go-version: [1.20.x, 1.21.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::'
|