|
7 | 7 | - 'rust/**' |
8 | 8 | - 'diff_diff/**' |
9 | 9 | - 'tests/**' |
| 10 | + # tests/test_doc_snippets.py is owned by docs-tests.yml; exclude it |
| 11 | + # so a harness-only edit does not fan out into the Rust matrix. |
| 12 | + - '!tests/test_doc_snippets.py' |
10 | 13 | - 'pyproject.toml' |
11 | 14 | - '.github/workflows/rust-test.yml' |
12 | 15 | pull_request: |
|
16 | 19 | - 'rust/**' |
17 | 20 | - 'diff_diff/**' |
18 | 21 | - 'tests/**' |
| 22 | + - '!tests/test_doc_snippets.py' |
19 | 23 | - 'pyproject.toml' |
20 | 24 | - '.github/workflows/rust-test.yml' |
21 | 25 |
|
@@ -155,14 +159,18 @@ jobs: |
155 | 159 | - name: Run tests with Rust backend (Unix) |
156 | 160 | if: runner.os != 'Windows' |
157 | 161 | working-directory: /tmp |
158 | | - run: DIFF_DIFF_BACKEND=rust pytest tests/ -q -n auto --dist worksteal -m '' |
| 162 | + # Doc snippet tests own .github/workflows/docs-tests.yml; ignore |
| 163 | + # them here to keep one workflow per surface and avoid double |
| 164 | + # execution (the matrix copies tests/ to /tmp/tests without |
| 165 | + # docs/, so this ignore is defensive on the Rust path). |
| 166 | + run: DIFF_DIFF_BACKEND=rust pytest tests/ --ignore=tests/test_doc_snippets.py -q -n auto --dist worksteal -m '' |
159 | 167 |
|
160 | 168 | - name: Run tests with Rust backend (Windows) |
161 | 169 | if: runner.os == 'Windows' |
162 | 170 | working-directory: ${{ runner.temp }} |
163 | 171 | run: | |
164 | 172 | $env:DIFF_DIFF_BACKEND="rust" |
165 | | - pytest tests/ -q -n auto --dist worksteal -m '' |
| 173 | + pytest tests/ --ignore=tests/test_doc_snippets.py -q -n auto --dist worksteal -m '' |
166 | 174 | shell: pwsh |
167 | 175 |
|
168 | 176 | # Test pure Python fallback (without Rust extension) |
@@ -190,4 +198,8 @@ jobs: |
190 | 198 | PYTHONPATH=. python -c "from diff_diff import HAS_RUST_BACKEND; print(f'HAS_RUST_BACKEND: {HAS_RUST_BACKEND}'); assert not HAS_RUST_BACKEND" |
191 | 199 |
|
192 | 200 | - name: Run tests in pure Python mode |
193 | | - run: PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/ -q --ignore=tests/test_rust_backend.py -n auto --dist worksteal |
| 201 | + # Doc snippet tests own .github/workflows/docs-tests.yml; ignore |
| 202 | + # them here to keep one workflow per surface (this is the only |
| 203 | + # invocation that actually executes test_doc_snippets.py since |
| 204 | + # this job runs from the repo root, not /tmp/tests). |
| 205 | + run: PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest tests/ -q --ignore=tests/test_rust_backend.py --ignore=tests/test_doc_snippets.py -n auto --dist worksteal |
0 commit comments