name: Pre-commit Tests on: pull_request: branches: [ main ] jobs: lint-and-format: runs-on: ubuntu-24.04 if: github.actor != 'weblate' steps: - uses: actions/checkout@v7 - name: Install uv uses: astral-sh/setup-uv@v7 - name: Set up Python uses: actions/setup-python@v7 with: python-version-file: pyproject.toml - name: Cache dependencies uses: actions/cache@v5 with: path: ~/.cache/uv key: ${{ runner.os }}-uv-${{ hashFiles('**/pyproject.toml') }} restore-keys: | ${{ runner.os }}-uv- - name: Install dependencies run: uv sync --dev - uses: astral-sh/ruff-action@v3 - run: ruff check --fix app/ - run: ruff format app/ - name: Run djlint run: uv run djlint app/templates --check --profile=jinja - name: Run ty check run: | # Note: ty is pre-release software and may have false positives # Run type checking but don't fail the workflow on type errors uv run ty check app/ || echo "⚠️ Type checking found issues but continuing..." echo "✅ Type check completed (warnings/errors above are non-blocking)"