the-custodian/.forgejo/workflows/python-tests.yaml
custodian-sync 6fe7201fd5
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Reject generated-only commits / generated-commit-guard (push) Successful in 7s
Python Tests / pytest (push) Successful in 25s
chore(consistency): sync task status from DB [auto]
Updated by fix-consistency on 2026-10-11:
  - update .custodian-brief.md for the-custodian
2026-10-11 21:30:44 +02:00

39 lines
1.3 KiB
YAML

# 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/**"
- "scripts/**"
- "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 git 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