name: Go
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
go-version: [1.16.x, 1.15.x, 1.14.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Build on ${{ matrix.os }}
if: matrix.os == 'windows-latest'
run: go test -race -v ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'macos-latest'
run: go test -race -v ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'ubuntu-latest'
run: |
diff -au <(gofmt -d .) <(printf "")
go test -race -v ./...
go vet -asmdecl .
./test-architectures.sh