name: Go Tests

on:
  push:
    branches:
      - "main"
      - "test/**"
      - "release/**"
  pull_request:
    branches:
      - main
    paths:
      - ".github/**"
      - "**.go"
      - "go.*"
      - "Makefile"
      - "scripts/**"
      - "test/**"
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - name: Set up Go
        uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
        with:
          go-version: "1.23.2"

      - name: Install dependencies
        run: go mod tidy

      - name: Run tests
        run: make test
    timeout-minutes: 10
