mirror of
https://github.com/wizarrrr/wizarr.git
synced 2026-07-31 07:17:10 -04:00
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
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)"
|