name: Test
on:
  pull_request:
  push:
    paths:
      - "**.go"
    branches:
      - v0.38.x

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        part: ["00", "01", "02", "03", "04", "05"]
    steps:
      - uses: actions/setup-go@v5
        with:
          go-version: "1.22"
      - uses: actions/checkout@v4
      - uses: technote-space/get-diff-action@v6
        with:
          PATTERNS: |
            **/**.go
            "!test/"
            go.mod
            go.sum
            Makefile
      - name: Run Go Tests
        run: |
          make test-group-${{ matrix.part }} NUM_SPLIT=6
        if: env.GIT_DIFF
