2020-11-02 18:46:37 -05:00
|
|
|
name: Test
|
|
|
|
|
2020-12-07 15:25:14 -05:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
- '**.toml'
|
|
|
|
- '**.desktop'
|
|
|
|
- 'LICENSE'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
2020-12-07 15:32:35 -05:00
|
|
|
- '**.md'
|
|
|
|
- '**.toml'
|
|
|
|
- '**.desktop'
|
2020-12-07 15:25:14 -05:00
|
|
|
- 'LICENSE'
|
|
|
|
|
2020-11-02 18:46:37 -05:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
2020-12-07 15:25:14 -05:00
|
|
|
fail-fast: false
|
2020-11-02 18:46:37 -05:00
|
|
|
matrix:
|
|
|
|
go-version: ['1.13', '1.14', '1.15']
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Install make on Windows
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: choco install make
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
go test -race ./...
|
|
|
|
make
|