name: Unit tests

on:
  push:
    branches:
      - 'main'
  pull_request:
    branches:
      - 'main'

permissions: {}

jobs:
  tests:
    runs-on: ubuntu-latest

    permissions:
      contents: read

    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
        with:
          egress-policy: audit

      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false

      - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
        with:
          go-version: '1.25'
          check-latest: true

      - run: make test
