name: Lint against Ruff
on:
  workflow_call:
  push:
    branches:
      - main
  pull_request:

jobs:
  test-with-pytest:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v4
        with:
          python-version: '3.12'

      - name: Install requirements
        run: |
          python -m pip install -r requirements.txt

      - name: Run tests
        run: python -m ruff check ./