functional_tests + CI: rename pass + structural consolidations + parallel test-FTs split — every FT file now starts with one of 6 prefixes (test_admin_* / test_bill_* / test_core_* / test_dash_* / test_game_room_* / test_trinket_*) plus the 4 page-roots test_billboard / test_dashboard / test_gameboard / test_jasmine, so the partition is unambiguous and stable for tooling (the previous mix of test_applet_*, test_room_*, test_component_*, ad-hoc names had no consistent grouping); session-side: merged test_gatekeeper_bud_btn.py into test_bud_btn.py (then user renamed to test_core_bud_btn.py) — both files drove the same #id_bud_btn UI in two contexts (post-share + gatekeeper invite) and shared the bud-btn.js skeleton, so consolidation was overdue; split test_component_cards_tarot.py into test_admin_tarot.py (just TarotAdminTest, sitting next to test_admin / test_admin_post_readonly) + 3 classes (TarotDeckTest / GameKitDeckSelectionTest / GameKitPageTest) appended to test_game_room_tray.py; updated stale test_bud_btn.py references in the test_core_bud_btn.py docstring + test_admin_post_readonly.py comment to point at the new filename; user-driven renames (22 files): test_applet_my_notes/posts → test_bill_my_*, test_applet_new_post[_line_validation] → test_bill_new_post[_line_validation], test_applet_my_sky → test_dash_my_sky, test_applet_palette → test_dash_palette, test_wallet → test_dash_wallet, test_login → test_core_login, test_navbar → test_core_navbar, test_sharing → test_core_sharing, test_layout_and_styling → test_core_styling, test_my_buds → test_bill_my_buds, test_bud_btn → test_core_bud_btn, test_deck_contribution → test_game_room_deck_contrib, test_game_invite → test_game_room_invite, test_room_gatekeeper → test_game_room_gatekeeper, test_room_role_select → test_game_room_select_role, test_room_sea_select → test_game_room_select_sea, test_room_sig_select → test_game_room_select_sig, test_room_sky_select → test_game_room_select_sky, test_room_tray → test_game_room_tray, test_component_tray_tooltip → test_game_room_tray_tooltip; the post_page.py / room_page.py helper modules from the May-12 sprint absorbed the cross-file FT imports that would otherwise have cascade-broken on these renames
.woodpecker/main.yaml — CI test-FTs step splits into parallel siblings test-FTs-non-room (22 files via `ls functional_tests/test_*.py | grep -v 'test_game_room_'`) + test-FTs-room (9 files via `ls functional_tests/test_game_room_*.py`); room cluster is the heaviest (~70% of the pre-split ~40-min wall-clock) and now runs concurrently w. the rest instead of in series; DAG explicit via depends_on on every step (Woodpecker mixes default-sequential w. depends_on awkwardly, so each step pins its prerequisite); collectstatic stays in test-two-browser-FTs only — the shared workspace propagates assets to both parallel FT steps, no race + no duplication; screendumps + build-and-push fan back in (depends_on both parallel steps); deploy-staging + deploy-prod depend on build-and-push smoke-import: 31/31 FT modules green after the rename pass 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:
@@ -37,6 +37,8 @@ steps:
|
||||
|
||||
- name: test-two-browser-FTs
|
||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||
depends_on:
|
||||
- test-UTs-n-ITs
|
||||
environment:
|
||||
HEADLESS: 1
|
||||
CELERY_BROKER_URL: redis://redis:6379/0
|
||||
@@ -49,6 +51,8 @@ steps:
|
||||
commands:
|
||||
- pip install -r requirements.dev.txt
|
||||
- cd ./src
|
||||
# Also collectstatic'd here; output sits in the shared workspace so
|
||||
# the downstream parallel FT steps don't have to repeat it.
|
||||
- python manage.py collectstatic --noinput
|
||||
- python manage.py test functional_tests --tag=two-browser
|
||||
- python manage.py test functional_tests --tag=sequential
|
||||
@@ -60,8 +64,24 @@ steps:
|
||||
- "requirements.txt"
|
||||
- ".woodpecker/main.yaml"
|
||||
|
||||
- name: test-FTs
|
||||
# ── Parallel FT split ─────────────────────────────────────────────────
|
||||
#
|
||||
# test_game_room_* is the heaviest cluster — 9 Selenium-driven room-flow
|
||||
# FTs that historically dominate the FT step wall-clock (~70% of the
|
||||
# ~40-min single-step runs). Split off into its own step (`test-FTs-room`)
|
||||
# that runs in parallel with the rest (`test-FTs-non-room`). Both depend
|
||||
# on test-two-browser-FTs (which leaves collectstatic'd assets in the
|
||||
# shared workspace), so neither parallel step re-runs collectstatic.
|
||||
#
|
||||
# Tradeoff: 2 concurrent Selenium/Firefox containers on the runner
|
||||
# instead of 1, in exchange for roughly halved test-FT wall-clock when
|
||||
# the partition stays balanced. If the runner thrashes, drop the
|
||||
# `depends_on` from one to serialize them again.
|
||||
|
||||
- name: test-FTs-non-room
|
||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||
depends_on:
|
||||
- test-two-browser-FTs
|
||||
environment:
|
||||
HEADLESS: 1
|
||||
CELERY_BROKER_URL: redis://redis:6379/0
|
||||
@@ -74,8 +94,37 @@ steps:
|
||||
commands:
|
||||
- pip install -r requirements.dev.txt
|
||||
- cd ./src
|
||||
- python manage.py collectstatic --noinput
|
||||
- python manage.py test functional_tests --parallel --exclude-tag=channels --exclude-tag=two-browser
|
||||
# Every FT file EXCEPT test_game_room_* — that cluster runs in
|
||||
# test-FTs-room. Channels + two-browser tags already covered upstream.
|
||||
# `ls | grep -v | sed` enumerates module dotted-paths from filenames.
|
||||
- python manage.py test --parallel --exclude-tag=channels --exclude-tag=two-browser $(ls functional_tests/test_*.py | grep -v 'test_game_room_' | sed 's|/|.|g;s|\.py||')
|
||||
when:
|
||||
- event: push
|
||||
path:
|
||||
- "src/**"
|
||||
- "requirements.txt"
|
||||
- ".woodpecker/main.yaml"
|
||||
|
||||
- name: test-FTs-room
|
||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||
depends_on:
|
||||
- test-two-browser-FTs
|
||||
environment:
|
||||
HEADLESS: 1
|
||||
CELERY_BROKER_URL: redis://redis:6379/0
|
||||
REDIS_URL: redis://redis:6379/1
|
||||
STRIPE_SECRET_KEY:
|
||||
from_secret: stripe_secret_key
|
||||
STRIPE_PUBLISHABLE_KEY:
|
||||
from_secret: stripe_publishable_key
|
||||
PIP_CACHE_DIR: .pip-cache
|
||||
commands:
|
||||
- pip install -r requirements.dev.txt
|
||||
- cd ./src
|
||||
# Heavy Selenium room flows — 9 files (deck_contrib, gatekeeper,
|
||||
# invite, select_role/sea/sig/sky, tray, tray_tooltip) isolated into
|
||||
# their own parallel sub-step.
|
||||
- python manage.py test --parallel --exclude-tag=channels --exclude-tag=two-browser $(ls functional_tests/test_game_room_*.py | sed 's|/|.|g;s|\.py||')
|
||||
when:
|
||||
- event: push
|
||||
path:
|
||||
@@ -85,6 +134,9 @@ steps:
|
||||
|
||||
- name: screendumps
|
||||
image: gitea.earthmanrpg.me/discoman/python-tdd-ci:latest
|
||||
depends_on:
|
||||
- test-FTs-non-room
|
||||
- test-FTs-room
|
||||
commands:
|
||||
- cat ./src/functional_tests/screendumps/*.html || echo "No screendumps found"
|
||||
when:
|
||||
@@ -97,6 +149,9 @@ steps:
|
||||
|
||||
- name: build-and-push
|
||||
image: docker:cli
|
||||
depends_on:
|
||||
- test-FTs-non-room
|
||||
- test-FTs-room
|
||||
environment:
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: gitea_registry_password
|
||||
@@ -115,6 +170,8 @@ steps:
|
||||
|
||||
- name: deploy-staging
|
||||
image: alpine
|
||||
depends_on:
|
||||
- build-and-push
|
||||
environment:
|
||||
SSH_KEY:
|
||||
from_secret: deploy_ssh_key
|
||||
@@ -136,6 +193,8 @@ steps:
|
||||
|
||||
- name: deploy-prod
|
||||
image: alpine
|
||||
depends_on:
|
||||
- build-and-push
|
||||
environment:
|
||||
SSH_KEY:
|
||||
from_secret: deploy_ssh_key
|
||||
|
||||
Reference in New Issue
Block a user