name: Test

on:
  push:
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v6
        with:
          fetch-depth: 0 # all history for all branches and tags

      - uses: actions/setup-go@v6
        with:
          go-version-file: go.mod
          check-latest: true
          cache: false

      - name: Run go test
        run: go test -mod vendor -race -coverprofile coverage.out -gcflags--l -v ./...