# Runs the repo's pytest suite (tests/) — previously unwired to CI, so # regressions in tools/ (scan_workstream_terminology, validate_work_records, # ...) went undetected. CUST-WP-0060 test-coverage follow-up. # Runner substrate: ubuntu-latest maps to docker://node:20-bookworm (no # python) — install python3 + deps via apt (same pattern as kaizen ci.yml # and the work-records validation gate). name: Python Tests on: push: branches: - main paths: - "tools/**" - "tests/**" - "canon/standards/**" - ".forgejo/workflows/python-tests.yaml" pull_request: workflow_dispatch: jobs: pytest: runs-on: ubuntu-latest steps: - name: Fetch repo, run pytest run: | set -eu apt-get update -qq >/dev/null apt-get install -y -qq python3 python3-pip python3-yaml \ python3-jsonschema python3-pytest wget >/dev/null WORK="$(mktemp -d)"; trap 'rm -rf "$WORK"' EXIT REF="${GITHUB_SHA:-main}"; SHORT="${REF:0:7}" wget -qO "$WORK/repo.tar.gz" \ "https://forgejo.coulomb.social/${GITHUB_REPOSITORY}/archive/${SHORT}.tar.gz" mkdir -p "$WORK/repo" tar xzf "$WORK/repo.tar.gz" -C "$WORK/repo" --strip-components=1 cd "$WORK/repo" python3 -m pytest tests/ -q