name: Tests

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

env:
  rye_version: "0.44.0"

jobs:
  Testing:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python_version: ["3.11"]

    steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python_version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python_version }}
      - name: Set up Rye ${{ env.rye_version }}
        uses: sksat/setup-rye@v0.31.0
        with:
          version: ${{ env.rye_version }}
      - name: Install dependencies with rye
        run: |
          rye sync
      - name: Lint
        run: |
          rye run lint:style
          rye run lint:typing
      - name: Test
        run: |
          rye run test:pytest
