chore: update all versions (incl Django 5/Python 3.13) and make Docker config sensible #459
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Lint | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
MYPY_CACHE_DIR: "${{ github.workspace }}/.mypy_cache" | |
PYTHONPATH: "${{ github.workspace }}:${{ github.workspace }}/app" | |
jobs: | |
ruff: | |
name: Ruff | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
version: "latest" | |
- name: Install dependencies | |
run: uv sync --frozen | |
- name: Run ruff check | |
run: uv run ruff check . | |
- name: Run ruff format | |
run: uv run ruff format --check . | |
mypy: | |
name: Mypy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install GeoDjango dependencies | |
run: sudo apt-get install gdal-bin libgdal-dev libgeos-dev libproj-dev -y | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
version: "latest" | |
- name: Install dependencies | |
run: uv sync --frozen | |
- name: Cache mypy | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.MYPY_CACHE_DIR }} | |
key: ${{ runner.os }}-mypy-${{ hashFiles('**/uv.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mypy- | |
- name: Run mypy | |
run: uv run mypy |