-
Notifications
You must be signed in to change notification settings - Fork 1
132 lines (129 loc) · 4.87 KB
/
Copy pathrepo-hygiene.yml
File metadata and controls
132 lines (129 loc) · 4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Repo Hygiene
on:
pull_request:
push:
branches:
- main
jobs:
hygiene:
name: Static Hygiene
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
env:
PYTHON_STATIC_TARGETS: >-
tools/common/search_leak_policy.py
tools/common/atomic_write.py
tools/common/publication_builder.py
tools/common/runtime_ledger.py
tools/common/runtime_logging.py
tools/common/workspace_lock.py
tools/common/standards_profiles.py
tools/collateral/pdf_extract.py
tools/scripts/apply_review_decision.py
tools/scripts/bootstrap_topic_workspace.py
tools/scripts/audit_canonical_graph_closure.py
tools/scripts/audit_rebuildability.py
tools/scripts/build_candidate_feedback_plan.py
tools/scripts/build_local_search_projection.py
tools/scripts/build_publication_artifacts.py
tools/scripts/build_static_knowledge_tree.py
tools/scripts/build_release_readiness_bundle.py
tools/scripts/evaluate_network_safety_gate.py
tools/scripts/execute_source_adapter.py
tools/scripts/export_standards_profile.py
tools/scripts/export_redacted_diagnostics.py
tools/scripts/ingest_execution_artifacts.py
tools/scripts/ingest_gather_candidate_batch.py
tools/scripts/local_doctor.py
tools/scripts/operator_path_smoke.py
tools/scripts/query_local_search.py
tools/scripts/replay_canonical_write_spool.py
tools/scripts/topic_backup_drill.py
tools/scripts/run_scheduled_topic_cycles.py
tools/scripts/run_topic_cycle.py
tools/scripts/run_topic_gather.py
tools/scripts/select_scheduled_workspaces.py
tools/source_db_tools/authority_reconciliation.py
tools/source_db_tools/confidence_model.py
tools/source_db_tools/cycle_evidence_ledger.py
tools/source_db_tools/canonical_graph_closure.py
tools/source_db_tools/canonical_ingest.py
tools/source_db_tools/canonical_reconciliation.py
tools/source_db_tools/canonical_store.py
tools/source_db_tools/canonical_write_spool.py
tools/source_db_tools/identifier_normalization.py
tools/source_db_tools/init_canonical_store.py
tools/source_db_tools/loop_health.py
tools/source_db_tools/provenance_events.py
tools/source_db_tools/review_decision_apply.py
tools/source_db_tools/review_queue.py
tools/source_db_tools/schema_profile_validation.py
tools/source_db_tools/source_query_plan.py
tools/source_db_tools/sqlite_safety.py
tests/test_llm_runner_status.py
tests/test_mypy_runtime_gate.py
tests/test_packaging_metadata.py
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install hygiene tools
run: python -m pip install pytest "ruff>=0.8" "mypy>=1.13"
- name: Git whitespace check
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE: ${{ github.event.before }}
run: |
set -euo pipefail
if [ "$EVENT_NAME" = "pull_request" ] && [ -n "$PR_BASE_SHA" ]; then
git diff --check "$PR_BASE_SHA"..HEAD
elif [ -n "$PUSH_BEFORE" ] && [ "$PUSH_BEFORE" != "0000000000000000000000000000000000000000" ]; then
git diff --check "$PUSH_BEFORE"..HEAD
else
git diff --check HEAD~1..HEAD
fi
- name: Shell syntax check
run: |
set -euo pipefail
while IFS= read -r script; do
bash -n "$script"
done < <(find tools/scripts tools/source_db_tools -type f -name '*.sh' -print)
- name: Python compile check
run: python -m compileall -q tools tests
- name: Ruff lint
run: python -m ruff check $PYTHON_STATIC_TARGETS
- name: Ruff format check
run: python -m ruff format --check $PYTHON_STATIC_TARGETS
- name: Mypy type check
run: python -m mypy
validators:
name: Pytest Suite Smoke
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test runner
run: python -m pip install pytest "pytest-cov>=5" "jsonschema>=4.23"
- name: Run schema and validator regression smoke with coverage
run: python -m pytest -q --cov=tools --cov-report=term-missing --cov-report=xml