5109b6505c
Convert both pyproject.toml files to the uv_build backend and turn the repo into a proper uv workspace (plotstyle moved to src layout, since uv_build requires the module in its own subdirectory). Dev tooling moves from an optional-dependencies extra to a dependency-group, and plotstyle's matplotlib dependency is now its own rather than a gallery "plotting" extra. Gitea Actions workflows and the Dockerfile now use astral-sh/setup-uv, uv sync, uv run, uv build, and uv publish throughout instead of pip, build, and twine. Also fixes .dockerignore, which was excluding uv.lock, deploy/, and README.md and would have broken even the previous Dockerfile's COPY of deploy/entrypoint.sh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
name: lint:ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- run: uv run ruff check gallery plotstyle tests
|
|
|
|
format:
|
|
name: format:ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- run: uv run ruff format --check gallery plotstyle tests
|
|
|
|
typecheck:
|
|
name: typecheck:ty
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- run: uv run ty check gallery plotstyle
|
|
|
|
vulnerabilities:
|
|
name: vulnerabilities:pip-audit
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- run: uv run pip-audit --skip-editable
|
|
|
|
test:
|
|
name: test:pytest
|
|
runs-on: ubuntu-latest
|
|
needs: [lint, format, typecheck, vulnerabilities]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
- run: uv sync --all-packages
|
|
- run: uv run pytest tests/ -v
|