name: ci

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.25.x'
          cache: true

      - name: Test
        run: go test ./... -cover

      - name: Lint
        uses: golangci/golangci-lint-action@v7
        with:
          version: v2.7.2
          args: --timeout=3m
