Compare commits

...

9 Commits

Author SHA1 Message Date
bba5083154 ci: update playwright image to v1.59.0 to match python package
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:40:00 +03:00
243e111f8a ci: use actual clone dir name in workspace members
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:22:53 +03:00
f89ef64975 ci: add symlink for workspace member name mismatch
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:18:36 +03:00
a5d214da7e ci: use CI_WORKSPACE instead of hardcoded blog dir
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:14:55 +03:00
b1b7e5d1f3 ci: switch to python:3.13 full image with git and bash
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:11:34 +03:00
aea130edbd ci: install git in deps step for workspace clone
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 22:05:54 +03:00
9906af3b88 ci: fix workspace dependency resolution by cloning pytfm in parent dir
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 21:56:37 +03:00
d9c7bd3dd2 ci: consolidate woodpecker pipelines, fix global when syntax, clean pyproject.toml
Some checks failed
ci/woodpecker/pr/pipeline Pipeline failed
2026-05-08 21:42:28 +03:00
71fcd8db79 feature: pipeline update 2026-05-08 21:22:15 +03:00
5 changed files with 77 additions and 41 deletions

View File

@@ -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 .

76
.woodpecker/pipeline.yml Normal file
View File

@@ -0,0 +1,76 @@
when:
event: [push, pull_request]
branch: [dev, main, master]
steps:
- name: deps
image: python:3.13
volumes:
- /tmp/uv-cache:/root/.cache/uv
environment:
UV_CACHE_DIR: /root/.cache/uv
commands:
- pip install uv
- cd ..
- |
cat > pyproject.toml << 'EOF'
[project]
name = "pyaqa"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = []
[tool.uv.workspace]
members = ["blog.pyaqa.ru", "pytfm"]
EOF
- git clone https://git.pyaqa.ru/pi3c/pytfm.git
- cd $CI_WORKSPACE
- uv sync --no-dev --group lints --group tests --group types
- name: lint
image: python:3.13
volumes:
- /tmp/uv-cache:/root/.cache/uv
environment:
UV_CACHE_DIR: /root/.cache/uv
depends_on: [deps]
commands:
- pip install uv
- uv run ruff check .
- uv run ruff format --check .
- uv run isort --check-only .
- name: type
image: python:3.13
volumes:
- /tmp/uv-cache:/root/.cache/uv
environment:
UV_CACHE_DIR: /root/.cache/uv
depends_on: [deps]
commands:
- pip install uv
- uv run mypy .
- name: test-unit
image: python:3.13
volumes:
- /tmp/uv-cache:/root/.cache/uv
environment:
UV_CACHE_DIR: /root/.cache/uv
depends_on: [deps]
commands:
- pip install uv
- uv run pytest tests/unit/ --no-cov
- name: test-e2e
image: mcr.microsoft.com/playwright/python:v1.59.0
volumes:
- /tmp/uv-cache:/root/.cache/uv
environment:
UV_CACHE_DIR: /root/.cache/uv
depends_on: [deps]
commands:
- pip install uv
- uv run blog &
- sleep 5
- uv run pytest tests/e2e/ -v

View File

@@ -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

View File

@@ -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 .

View File

@@ -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",
]