After ORCH-10 the webhook resolves Plane state UUIDs per-project via get_project_states(project_id). The m6/plane webhook tests hardcoded the enduro in_progress UUID for ORCH-project payloads, so the pipeline never started and task creation assertions failed. Tests: - Mock get_project_states with a deterministic per-project ET/ORCH map (no network) and reset _STATES_CACHE via reload_project_states() per test. - Send each request with the in_progress UUID that matches its own project. CI hole: - requirements.txt lacked pytest-asyncio, so the 6 @pytest.mark.asyncio tests in test_orch10_states.py were SILENTLY SKIPPED -> CI green while async paths never ran. Add pytest-asyncio + pytest.ini (asyncio_mode=auto, strict markers); harden ci.yml (set -euo pipefail, --strict-markers) so any failure or unknown marker reds the build and the whole suite runs. src/ unchanged (per-project resolving is the ORCH-10 feature, kept as-is).
29 lines
956 B
YAML
29 lines
956 B
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: ["feature/**", "bugfix/**", "hotfix/**", "fix/**", "ci/**"]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
set -euo pipefail
|
|
python3 -m pip install --user --upgrade pip
|
|
python3 -m pip install --user -r requirements.txt
|
|
- name: Test
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
run: |
|
|
# ORCH-39: fail the job on ANY failure. Run the WHOLE suite from the
|
|
# repo root. --strict-markers + pytest-asyncio (asyncio_mode=auto, see
|
|
# pytest.ini) make async tests actually run instead of silently
|
|
# skipping (the hole that hid red tests behind a green CI).
|
|
set -euo pipefail
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
python3 -m pytest tests/ -q -p no:cacheprovider --strict-markers
|