-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (65 loc) · 2.16 KB
/
Copy pathci.yml
File metadata and controls
71 lines (65 loc) · 2.16 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
# Pinned so the gate is reproducible: a new ruff release cannot turn the
# build red without an explicit bump here.
- run: pip install "ruff==0.15.17"
- run: ruff check .
test:
name: Tests (deterministic harnesses)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
# pandoc gives tests/test_ingest.sh a real docx converter; without it that
# test self-skips its conversion assertions rather than failing.
- run: sudo apt-get update && sudo apt-get install -y pandoc
# Discover every tests/test_*.sh so a new harness is picked up automatically
# (no hardcoded list to forget). pipefail+errexit (the default Actions bash
# flags) make the step fail on the first failing harness.
- name: deterministic shell harnesses
run: |
for t in tests/test_*.sh; do
echo "::group::$t"
bash "$t"
echo "::endgroup::"
done
- name: clean-env plugin smoke (pipeline end-to-end)
run: bash tests/smoke.sh
unit:
name: Unit tests (pytest) + golden
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
cache-dependency-path: pyproject.toml
- run: pip install -e ".[test]"
- name: pytest (pure-function unit layer)
run: pytest
# The golden engine regression needs pyrewire (pulled in by the install
# above); run it on a throwaway copy so the checkout stays clean.
- name: golden engine regression
run: |
cp -r examples/sample-kb "${RUNNER_TEMP}/golden-kb"
FACTLOG_ROOT="${RUNNER_TEMP}/golden-kb" bash tests/golden.sh