Repository navigation
Commit e113773
authored
ci(examples): run the Python example gates on the code they depend on (#1702)
The example tests under big-code-analysis-py (test_book_examples.py
and the parity rows in test_smoke.py / test_sarif.py) and the
jupyter_quickstart.ipynb nbconvert job were already wired into CI,
but three things let them not run, or run against the wrong inputs:
- The `py` path filter listed only the bindings crate and the root
manifests, so a change to src/, the parse layer, the CLI or a
vendored grammar left every python-* job `skipped` even though the
extension links all of them and the parity examples byte-compare
against the CLI. Add those directories to the filter.
- The `bca` the parity examples compare against was built implicitly
inside the `bca_binary` fixture, without `--locked` and outside the
job log. Build it in an explicit step and export `BCA_BINARY` via
`$GITHUB_ENV` so it reaches the PowerShell pytest step on Windows.
- The notebook documents `BCA_NOTEBOOK_FIXTURES` as the contract the
CI step uses, but the step never set it. Set it.
The runnable-example discovery gate also only enumerated `*.py`, so a
second notebook could land with nothing executing it; it now
reconciles `*.ipynb` against `NON_PY_EXAMPLES` too. Verified by
dropping a stray notebook into examples/ and watching exactly that
test fail.
Validated locally with the environments CI provisions: the dev and
examples requirement exports installed with --require-hashes, maturin
develop, pytest against the --locked CLI (77 passed, all cli_parity
rows passing not skipping), the exact nbconvert command with the env
var set (6/6 cells executed), and `make pre-commit` (BCA_GATE: pass).1 parent 02666d8 commit e113773
2 files changed
Lines changed: 72 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
| |||
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
64 | 82 | | |
65 | 83 | | |
66 | 84 | | |
| |||
935 | 953 | | |
936 | 954 | | |
937 | 955 | | |
938 | | - | |
| 956 | + | |
| 957 | + | |
939 | 958 | | |
940 | 959 | | |
941 | 960 | | |
| |||
1101 | 1120 | | |
1102 | 1121 | | |
1103 | 1122 | | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1104 | 1141 | | |
1105 | 1142 | | |
1106 | 1143 | | |
| |||
1140 | 1177 | | |
1141 | 1178 | | |
1142 | 1179 | | |
1143 | | - | |
1144 | | - | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1145 | 1183 | | |
1146 | 1184 | | |
1147 | 1185 | | |
| |||
1183 | 1221 | | |
1184 | 1222 | | |
1185 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1186 | 1232 | | |
1187 | 1233 | | |
| 1234 | + | |
| 1235 | + | |
1188 | 1236 | | |
1189 | 1237 | | |
1190 | 1238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
350 | 365 | | |
351 | 366 | | |
352 | 367 | | |
| |||
0 commit comments