name: Testing zangramru

on: push

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.12'
      - name: Set up UV
        uses: astral-sh/setup-uv@v6
      - name: Install deps
        run: uv sync
      - name: Run lint check
        run: uv run pre-commit run -a
  pytest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: run tests
        run: docker compose run --build --rm api pytest -vv
      - name: show logs
        if: 'always()'
        run: docker compose logs
