feature: pipeline update
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
when:
|
||||
- event: [push, pull_request]
|
||||
branch: dev
|
||||
|
||||
steps:
|
||||
- name: lint
|
||||
image: python:3.13
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --only-group lints
|
||||
- uv run ruff check .
|
||||
- uv run ruff format --check .
|
||||
- uv run isort --check-only .
|
||||
|
||||
69
.woodpecker/pipeline.yml
Normal file
69
.woodpecker/pipeline.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
when:
|
||||
- event: [push, pull_request]
|
||||
branch: [dev, main, master]
|
||||
|
||||
steps:
|
||||
- name: deps
|
||||
image: python:3.13-slim
|
||||
volumes:
|
||||
- /tmp/uv-cache:/root/.cache/uv
|
||||
environment:
|
||||
UV_CACHE_DIR: /root/.cache/uv
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group lints --group tests --group types
|
||||
|
||||
- name: lint
|
||||
image: python:3.13-slim
|
||||
volumes:
|
||||
- /tmp/uv-cache:/root/.cache/uv
|
||||
environment:
|
||||
UV_CACHE_DIR: /root/.cache/uv
|
||||
depends_on: [deps]
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group lints --group tests --group types
|
||||
- uv run ruff check .
|
||||
- uv run ruff format --check .
|
||||
- uv run isort --check-only .
|
||||
|
||||
- name: type
|
||||
image: python:3.13-slim
|
||||
volumes:
|
||||
- /tmp/uv-cache:/root/.cache/uv
|
||||
environment:
|
||||
UV_CACHE_DIR: /root/.cache/uv
|
||||
depends_on: [deps]
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group lints --group tests --group types
|
||||
- uv run mypy .
|
||||
|
||||
- name: test-unit
|
||||
image: python:3.13-slim
|
||||
volumes:
|
||||
- /tmp/uv-cache:/root/.cache/uv
|
||||
environment:
|
||||
UV_CACHE_DIR: /root/.cache/uv
|
||||
depends_on: [deps]
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group lints --group tests --group types
|
||||
- uv run pytest tests/unit/ --no-cov
|
||||
|
||||
# E2E tests require a running server and Playwright browser.
|
||||
# They are kept separate because they need the full dev dependency set
|
||||
# and a longer-lived test environment.
|
||||
- name: test-e2e
|
||||
image: mcr.microsoft.com/playwright/python:v1.51.0
|
||||
volumes:
|
||||
- /tmp/uv-cache:/root/.cache/uv
|
||||
environment:
|
||||
UV_CACHE_DIR: /root/.cache/uv
|
||||
depends_on: [deps]
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group lints --group tests --group types
|
||||
- uv run blog &
|
||||
- sleep 5
|
||||
- uv run pytest tests/e2e/ -v
|
||||
@@ -1,11 +0,0 @@
|
||||
when:
|
||||
- event: [push, pull_request]
|
||||
branch: dev
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: python:3.13
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --group tests
|
||||
- uv run pytest --cov=app --cov-fail-under=70 --cov-report=term-missing
|
||||
@@ -1,11 +0,0 @@
|
||||
when:
|
||||
- event: [push, pull_request]
|
||||
branch: dev
|
||||
|
||||
steps:
|
||||
- name: type
|
||||
image: python:3.13
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --no-dev --only-group types
|
||||
- uv run mypy .
|
||||
@@ -48,14 +48,11 @@ tests = [
|
||||
"pytfm",
|
||||
]
|
||||
lints = [
|
||||
"black>=23.7.0",
|
||||
"ruff>=0.15.11",
|
||||
"isort>=8.0.1",
|
||||
]
|
||||
types = [
|
||||
"mimesis>=19.1.0",
|
||||
"mypy>=1.20.1",
|
||||
"pytfm",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
@@ -66,11 +63,10 @@ pytfm = { workspace = true }
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
addopts = "--cov=app --cov-report=term-missing --cov-report=html"
|
||||
addopts = "--cov=app --cov-fail-under=70 --cov-report=term-missing --cov-report=html"
|
||||
pythonpath = "."
|
||||
testpaths = "tests"
|
||||
xfail_strict = true
|
||||
exclude = ["tests/e2e"]
|
||||
markers = [
|
||||
"e2e: End-to-end tests requiring running server",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user