@@ -131,7 +131,100 @@ jobs:
131131 - name : Ensure uv.lock matches pyproject.toml
132132 run : uv lock --check
133133
134- - name : Run unit tests
134+ - name : Run P2 scoped unit tests
135+ run : |
136+ set -euo pipefail
137+ # P2 scoped gate; this is not a repository-wide full-suite result.
138+ PYTHONPATH=. PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --no-sync python -m pytest -q tests/test_broker_reconciliation.py tests/test_execution_service.py tests/test_rebalance_service.py tests/test_ci_unit_test_contract.py
139+
140+ - name : Summarize P2 scoped gate
141+ run : |
142+ echo "P2 scoped gate passed; this is not a repository-wide full-suite result." >> "$GITHUB_STEP_SUMMARY"
143+
144+ legacy-full-suite :
145+ runs-on : ubuntu-latest
146+ timeout-minutes : 20
147+ steps :
148+ - name : Checkout
149+ uses : actions/checkout@v6
150+
151+ - name : Resolve QuantPlatformKit ref
152+ id : quant-platform-kit-ref
153+ run : |
154+ set -euo pipefail
155+ ref="main"
156+ for candidate in "${GITHUB_HEAD_REF:-}" "${GITHUB_BASE_REF:-}"; do
157+ if [ -n "$candidate" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/QuantPlatformKit.git "$candidate" >/dev/null 2>&1; then
158+ ref="$candidate"
159+ break
160+ fi
161+ done
162+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
163+
164+ - name : Resolve UsEquityStrategies ref
165+ id : us-equity-strategies-ref
166+ run : |
167+ set -euo pipefail
168+ ref="main"
169+ for candidate in "${GITHUB_HEAD_REF:-}" "${GITHUB_BASE_REF:-}"; do
170+ if [ -n "$candidate" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/UsEquityStrategies.git "$candidate" >/dev/null 2>&1; then
171+ ref="$candidate"
172+ break
173+ fi
174+ done
175+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
176+
177+ - name : Resolve UsEquitySnapshotPipelines ref
178+ id : us-equity-snapshot-pipelines-ref
179+ run : |
180+ set -euo pipefail
181+ ref="main"
182+ for candidate in "${GITHUB_HEAD_REF:-}" "${GITHUB_BASE_REF:-}"; do
183+ if [ -n "$candidate" ] && git ls-remote --exit-code --heads https://github.com/QuantStrategyLab/UsEquitySnapshotPipelines.git "$candidate" >/dev/null 2>&1; then
184+ ref="$candidate"
185+ break
186+ fi
187+ done
188+ echo "ref=${ref}" >> "$GITHUB_OUTPUT"
189+
190+ - name : Checkout QuantPlatformKit
191+ uses : actions/checkout@v6
192+ with :
193+ repository : QuantStrategyLab/QuantPlatformKit
194+ ref : ${{ steps.quant-platform-kit-ref.outputs.ref }}
195+ path : external/QuantPlatformKit
196+
197+ - name : Checkout UsEquityStrategies
198+ uses : actions/checkout@v6
199+ with :
200+ repository : QuantStrategyLab/UsEquityStrategies
201+ ref : ${{ steps.us-equity-strategies-ref.outputs.ref }}
202+ path : external/UsEquityStrategies
203+
204+ - name : Checkout UsEquitySnapshotPipelines
205+ uses : actions/checkout@v6
206+ with :
207+ repository : QuantStrategyLab/UsEquitySnapshotPipelines
208+ ref : ${{ steps.us-equity-snapshot-pipelines-ref.outputs.ref }}
209+ path : external/UsEquitySnapshotPipelines
210+
211+ - name : Setup Python
212+ uses : actions/setup-python@v6
213+ with :
214+ python-version : " 3.12"
215+
216+ - name : Install dependencies
217+ run : |
218+ set -euo pipefail
219+ python -m pip install --upgrade pip uv
220+ uv sync --frozen --extra test
221+
222+ - name : Install editable shared repositories
223+ run : |
224+ set -euo pipefail
225+ uv pip install --no-deps -e external/QuantPlatformKit -e external/UsEquityStrategies -e external/UsEquitySnapshotPipelines
226+
227+ - name : Run legacy full suite
135228 run : |
136229 set -euo pipefail
137230 PYTHONPATH=. PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --no-sync python -m pytest -q tests --ignore=tests/test_request_handling.py --ignore=tests/test_event_loop.py --ignore=tests/test_monitor_dispatcher.py --ignore=tests/test_notifications.py --ignore=tests/test_connect_timeout_alert.py
0 commit comments