Files
wizarr/.github/workflows/pr-test.yml

48 lines
1.2 KiB
YAML

name: Pre-commit Tests
on:
pull_request:
branches: [ main ]
jobs:
lint-and-format:
runs-on: ubuntu-latest
if: github.actor != 'weblate'
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: pyproject.toml
- name: Cache dependencies
uses: actions/cache@v4
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
- run: ruff format
- 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 || echo "⚠️ Type checking found issues but continuing..."
echo "✅ Type check completed (warnings/errors above are non-blocking)"