2022-08-05 13:21:27 +02:00
|
|
|
---
|
2021-04-28 23:11:07 +02:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-08-05 13:21:27 +02:00
|
|
|
branches: [master]
|
2021-04-28 23:11:07 +02:00
|
|
|
pull_request:
|
2022-08-05 13:21:27 +02:00
|
|
|
branches: [master]
|
2021-04-28 23:11:07 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are
|
|
|
|
# identical.
|
2022-08-05 13:21:27 +02:00
|
|
|
# See: https://github.com/actions/runner/issues/1182
|
2021-04-28 23:11:07 +02:00
|
|
|
build-linux:
|
2022-08-05 13:21:27 +02:00
|
|
|
runs-on: [ubuntu-latest]
|
2021-04-28 23:11:07 +02:00
|
|
|
steps:
|
2022-08-05 13:21:27 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.19
|
|
|
|
- name: Set up Revive (linter)
|
|
|
|
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
|
|
|
env:
|
|
|
|
GO111MODULE: "off"
|
|
|
|
- name: Build
|
|
|
|
run: make build
|
|
|
|
- name: Test
|
|
|
|
run: make test
|
2021-04-28 23:11:07 +02:00
|
|
|
|
|
|
|
build-osx:
|
2022-08-05 13:21:27 +02:00
|
|
|
runs-on: [macos-latest]
|
2021-04-28 23:11:07 +02:00
|
|
|
steps:
|
2022-08-05 13:21:27 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.19
|
|
|
|
- name: Set up Revive (linter)
|
|
|
|
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
|
|
|
env:
|
|
|
|
GO111MODULE: "off"
|
|
|
|
- name: Build
|
|
|
|
run: make build
|
|
|
|
- name: Test
|
|
|
|
run: make test
|