name: Test

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: "1.20"
      - name: Go linter
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.55
      - name: Run tests
        run: go test -v ./...