name: CI

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go: ['1.11', '1.12', '1.13', '1.14']
    env:
      VERBOSE: 1
      GOFLAGS: -mod=readonly

    steps:
      - name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: ${{ matrix.go }}

      - name: Checkout code
        uses: actions/checkout@v2

      - name: Run tests
        run: go test -v -race
