mirror of
https://github.com/Screenly/Anthias.git
synced 2026-07-31 01:35:58 -04:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Run mypy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- pyproject.toml
|
|
- uv.lock
|
|
- '**/*.py'
|
|
- '.github/workflows/python-mypy.yaml'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- pyproject.toml
|
|
- uv.lock
|
|
- '**/*.py'
|
|
- '.github/workflows/python-mypy.yaml'
|
|
|
|
jobs:
|
|
run-mypy:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.13"]
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
version: '0.9.17'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv venv
|
|
uv pip install --group mypy
|
|
|
|
- name: Prepare config directory
|
|
run: |
|
|
# The django-stubs plugin imports anthias_server.django_project.settings, which
|
|
# transitively instantiates AnthiasSettings(). On first run that
|
|
# tries to read ~/.anthias/anthias.conf — write a minimal valid
|
|
# one with the section headers AnthiasSettings expects.
|
|
mkdir -p ~/.anthias
|
|
cat > ~/.anthias/anthias.conf <<'CONF'
|
|
[main]
|
|
[viewer]
|
|
[auth_basic]
|
|
CONF
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
uv run mypy .
|