Repository navigation
55 lines (51 loc) · 1.63 KB
/
Copy pathcortex_check.yml
File metadata and controls
55 lines (51 loc) · 1.63 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
name: Cortex Check
# Guards the run-and-ruling registry: every task file parses and its state is
# legal, every ruling id is unique and every Supersedes: resolves, every
# project a task names is in projects.yaml, the gates/witness invariants hold
# (`scripts/cortex.py check`), then the script's own tests. No self-heal here:
# a failing check is a real contradiction and only a human can resolve it. The
# generated pages that DO self-heal (`dashboard.md`, `dashboard.html`) are
# `dashboard_refresh.yml`'s; this workflow only watches them for the drift that
# a hand-edit of a generated page would leave behind.
on:
push:
branches: [main]
paths:
- "projects/**"
- "archive/**"
- "projects.yaml"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
- "state.json"
- "scripts/**"
- "tests/**"
- ".github/workflows/cortex_check.yml"
pull_request:
paths:
- "projects/**"
- "archive/**"
- "projects.yaml"
- "checkin.yaml"
- "dashboard.md"
- "dashboard.html"
- "state.json"
- "scripts/**"
- "tests/**"
- ".github/workflows/cortex_check.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: dependencies
# `cortex.py` reads projects.yaml with PyYAML, so the deps go in before
# the check step, not only before the tests.
run: python3 -m pip install --quiet pytest pyyaml
- name: cortex check
run: python3 scripts/cortex.py check
- name: tests
run: python3 -m pytest tests -q