---
name: Tests

on:
  push:
  pull_request:

jobs:

  build:
    strategy:
      matrix:
        go-version:
          - "1.24"
          - "1.25"
    runs-on: ubuntu-latest

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

      - name: Check out code
        uses: actions/checkout@v6

      - name: Get dependencies
        run: go get -v ./...

      - name: Run go vet
        run: go vet ./...

      - name: Run tests
        run: ./test.sh

      - uses: codecov/codecov-action@v5
        with:
          files: ./coverage.txt
          verbose: true
