woodpecker main.yaml: A+B combined CI dependency speedup — test-UTs-n-ITs swaps image from python:3.13-slim to gitea.earthmanrpg.me/discoman/python-tdd-ci:latest (same image as the two FT steps) so all 3 steps inherit the requirements.dev.txt deps Dockerfile.ci already pre-installs; all 3 steps switch pip install -r requirements.txt → pip install -r requirements.dev.txt so the install collapses to ~5-10s of "already satisfied" verification per step (vs ~30-60s of unpinned PyPI resolver+download against requirements.txt); ~3-5 min saved per pipeline run; drift safety net preserved — pip still installs deltas if requirements.dev.txt is ahead of the image, so a stale image doesn't break CI, it just runs slower until the image is rebuilt + pushed
Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,19 +11,21 @@ services:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test-UTs-n-ITs
|
- name: test-UTs-n-ITs
|
||||||
image: python:3.13-slim
|
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgresql://postgres:postgres@postgres/python_tdd_test
|
DATABASE_URL: postgresql://postgres:postgres@postgres/python_tdd_test
|
||||||
CELERY_BROKER_URL: redis://redis:6379/0
|
CELERY_BROKER_URL: redis://redis:6379/0
|
||||||
REDIS_URL: redis://redis:6379/1
|
REDIS_URL: redis://redis:6379/1
|
||||||
# Workspace-shared pip cache — Woodpecker mounts the workspace across
|
|
||||||
# all steps in a run, so the wheels populated here are reused by
|
|
||||||
# test-two-browser-FTs + test-FTs (saves ~30-60s × 2 = ~1-2 min per
|
|
||||||
# run). Cache lives only inside one run; cross-run caching would
|
|
||||||
# need a volume plugin.
|
|
||||||
PIP_CACHE_DIR: .pip-cache
|
PIP_CACHE_DIR: .pip-cache
|
||||||
commands:
|
commands:
|
||||||
- pip install -r requirements.txt
|
# `requirements.dev.txt` is the pinned superset Dockerfile.ci pre-
|
||||||
|
# installs; pinning here means pip skips resolver+download and just
|
||||||
|
# verifies "already satisfied" (~5-10s) instead of resolving unpinned
|
||||||
|
# requirements.txt against PyPI from scratch (~30-60s). Drift safety
|
||||||
|
# net: if requirements.dev.txt has changed since the CI image was
|
||||||
|
# last rebuilt + pushed, pip installs the delta — slower for that
|
||||||
|
# run but never broken. See TDD SKILL.md § CI dependency discipline.
|
||||||
|
- pip install -r requirements.dev.txt
|
||||||
- cd ./src
|
- cd ./src
|
||||||
- python manage.py test apps
|
- python manage.py test apps
|
||||||
when:
|
when:
|
||||||
@@ -45,7 +47,7 @@ steps:
|
|||||||
from_secret: stripe_publishable_key
|
from_secret: stripe_publishable_key
|
||||||
PIP_CACHE_DIR: .pip-cache
|
PIP_CACHE_DIR: .pip-cache
|
||||||
commands:
|
commands:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.dev.txt
|
||||||
- cd ./src
|
- cd ./src
|
||||||
- python manage.py collectstatic --noinput
|
- python manage.py collectstatic --noinput
|
||||||
- python manage.py test functional_tests --tag=two-browser
|
- python manage.py test functional_tests --tag=two-browser
|
||||||
@@ -70,7 +72,7 @@ steps:
|
|||||||
from_secret: stripe_publishable_key
|
from_secret: stripe_publishable_key
|
||||||
PIP_CACHE_DIR: .pip-cache
|
PIP_CACHE_DIR: .pip-cache
|
||||||
commands:
|
commands:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.dev.txt
|
||||||
- cd ./src
|
- cd ./src
|
||||||
- python manage.py collectstatic --noinput
|
- python manage.py collectstatic --noinput
|
||||||
- python manage.py test functional_tests --parallel --exclude-tag=channels --exclude-tag=two-browser
|
- python manage.py test functional_tests --parallel --exclude-tag=channels --exclude-tag=two-browser
|
||||||
|
|||||||
Reference in New Issue
Block a user