ci: add test pipeline, PyPI release workflow, and lint fixes
- Update Woodpecker to run unit and integration tests in parallel - Add GitHub Actions workflow for PyPI trusted publishing on main - Add license, classifiers, keywords, and URLs to pyproject.toml - Fix ruff lint errors (unused imports, duplicate class name) and formatting
This commit is contained in:
@ -1,46 +1,20 @@
|
||||
when:
|
||||
event: push
|
||||
branch:
|
||||
- main
|
||||
- dev
|
||||
|
||||
variables:
|
||||
- &python_image "ghcr.io/astral-sh/uv:python3.13-bookworm-slim"
|
||||
- &uv_cache_dir "/root/.cache/uv"
|
||||
|
||||
steps:
|
||||
- name: restore-cache
|
||||
image: woodpeckerci/plugin-cache
|
||||
settings:
|
||||
restore: true
|
||||
cache_key: "uv-{{ checksum \"uv.lock\" }}"
|
||||
mount:
|
||||
- /root/.cache/uv
|
||||
|
||||
- name: lint
|
||||
image: *python_image
|
||||
environment:
|
||||
UV_CACHE_DIR: *uv_cache_dir
|
||||
UV_FROZEN: 1
|
||||
unit-tests:
|
||||
image: ghcr.io/astral-sh/uv:python3.13-bookworm
|
||||
commands:
|
||||
- uv sync --no-install-project
|
||||
- make lint
|
||||
- uv sync --dev
|
||||
- uv run pytest -m "not integration" -v
|
||||
|
||||
- name: test
|
||||
image: *python_image
|
||||
integration-tests:
|
||||
image: ghcr.io/astral-sh/uv:python3.13-bookworm
|
||||
environment:
|
||||
UV_CACHE_DIR: *uv_cache_dir
|
||||
UV_FROZEN: 1
|
||||
WRENN_API_KEY:
|
||||
from_secret: WRENN_API_KEY
|
||||
commands:
|
||||
- uv sync --no-install-project
|
||||
- make test
|
||||
|
||||
- name: rebuild-cache
|
||||
image: woodpeckerci/plugin-cache
|
||||
when:
|
||||
- status: [success]
|
||||
settings:
|
||||
rebuild: true
|
||||
cache_key: "uv-{{ checksum \"uv.lock\" }}"
|
||||
mount:
|
||||
- /root/.cache/uv
|
||||
- uv sync --dev
|
||||
- uv run pytest -m integration -v
|
||||
|
||||
Reference in New Issue
Block a user