2019-08-15 22:24:31 -03:00
|
|
|
name: Test
|
2022-05-14 21:00:15 -03:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
branches:
|
2023-04-15 20:39:35 +01:00
|
|
|
- main
|
2022-05-14 21:00:15 -03:00
|
|
|
|
2019-08-15 22:24:31 -03:00
|
|
|
jobs:
|
2019-10-24 23:25:06 -03:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-08-14 14:37:05 +01:00
|
|
|
go-version: [1.22.x, 1.23.x]
|
2019-10-24 23:25:06 -03:00
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{matrix.platform}}
|
2019-08-15 22:24:31 -03:00
|
|
|
steps:
|
2019-10-24 23:25:06 -03:00
|
|
|
- name: Set up Go ${{matrix.go-version}}
|
2024-05-16 03:59:23 +02:00
|
|
|
uses: actions/setup-go@v5
|
2019-08-15 22:24:31 -03:00
|
|
|
with:
|
2019-10-24 23:25:06 -03:00
|
|
|
go-version: ${{matrix.go-version}}
|
2019-08-15 22:24:31 -03:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
2024-05-16 03:59:23 +02:00
|
|
|
uses: actions/checkout@v4
|
2019-08-15 22:24:31 -03:00
|
|
|
|
2019-10-24 23:25:06 -03:00
|
|
|
- name: Download Go modules
|
|
|
|
run: go mod download
|
|
|
|
env:
|
|
|
|
GOPROXY: https://proxy.golang.org
|
2019-08-15 22:24:31 -03:00
|
|
|
|
|
|
|
- name: Build
|
2019-10-24 23:25:06 -03:00
|
|
|
run: go build -o ./bin/task -v ./cmd/task
|
2019-08-15 22:28:55 -03:00
|
|
|
|
|
|
|
- name: Test
|
2022-01-14 00:11:47 +00:00
|
|
|
run: ./bin/task test --output=group --output-group-begin='::group::{{.TASK}}' --output-group-end='::endgroup::'
|