2020-10-27 22:00:54 +00:00
|
|
|
name: unit-tests
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
|
|
macos-unit-tests:
|
|
|
|
name: macOS Unit Tests
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ^1.15
|
|
|
|
id: go
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache Dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
|
|
run: go test -short -race -v ./...
|
2020-10-27 22:20:12 +00:00
|
|
|
macos-unit-tests:
|
|
|
|
name: macOS Unit Tests
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ^1.15
|
|
|
|
id: go
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache Dependencies
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
|
|
run: go test -short -race -v ./...
|