.github/workflows/tests.yml
on:
push:
branches:
- main
name: Tests
jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest] # windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Installing Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checking out code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Running tests
run: go test -v -short ./...