name: Test

on:
  push:

  pull_request:

env:
  GODEBUG: tracebackancestors=1000

jobs:

  linux:

    runs-on: ubuntu-latest

    steps:

    - uses: actions/setup-go@v2
      with:
        go-version: 1.17

    - uses: actions/checkout@v2

    - name: lint
      run: go run github.com/ysmood/golangci-lint@latest

    - name: test
      run: |
        go test -race -coverprofile=coverage.out ./...
        go run github.com/ysmood/got/cmd/check-cov@latest
