name: Test
on:
  pull_request:
  push:
    branches:
    - master
    tags:
    - v*
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go-version:
          - 1.16.x
          - 1.17.x
    steps:
    - name: Set up Go
      uses: actions/setup-go@v1
      with:
        go-version: ${{ matrix.go-version }}
    - name: Cache Go modules
      uses: actions/cache@v1
      with:
        path: ~/go/pkg/mod
        key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
        restore-keys: |
          ${{ runner.os }}-go${{ matrix.go-version }}-
    - name: Checkout
      uses: actions/checkout@v2
    - name: Build
      run: go build ./...
    - name: Test
      run: go test -covermode=atomic -coverprofile=profile.cov -race ./...
    - name: Upload coverage
      uses: shogo82148/actions-goveralls@v1
      with:
        path-to-profile: profile.cov
  lint:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Lint
      uses: golangci/golangci-lint-action@v2
      with:
        version: v1.42
name: Test
on:
  pull_request:
  push:
    branches:
    - master
    tags:
    - v*
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go-version:
          - 1.17.x
    steps:
    - name: Set up Go
      uses: actions/setup-go@v1
      with:
        go-version: ${{ matrix.go-version }}
    - name: Cache Go modules
      uses: actions/cache@v1
      with:
        path: ~/go/pkg/mod
        key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
        restore-keys: |
          ${{ runner.os }}-go${{ matrix.go-version }}-
    - name: Checkout
      uses: actions/checkout@v2
    - name: Build
      run: go build ./...
    - name: Test
      run: go test -covermode=atomic -coverprofile=profile.cov -race ./...
    - name: Upload coverage
      uses: shogo82148/actions-goveralls@v1
      with:
        path-to-profile: profile.cov
  lint:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Lint
      uses: golangci/golangci-lint-action@v2
      with:
        version: v1.42
Drop support for Go 1.16
Drop support for Go 1.16
