Skip to content

Commit 413ab1a

Browse files
adamtheturtleclaude
andcommitted
Use docs/ as a single CI matrix entry instead of per-rst entries
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 00f78e6 commit 413ab1a

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ jobs:
119119
- tests/mock_vws/test_target_validators.py
120120
- tests/mock_vws/test_docker.py
121121
- ci/test_custom_linters.py
122-
- '**/*.rst'
122+
- README.rst
123+
- docs/
123124

124125
steps:
125126
- uses: actions/checkout@v6
@@ -161,7 +162,6 @@ jobs:
161162

162163
- name: Run tests
163164
run: |
164-
shopt -s globstar
165165
uv run --extra=dev \
166166
coverage run -m pytest \
167167
-s \

ci/test_custom_linters.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@
77
from beartype import beartype
88

99

10-
@beartype
11-
def _expand_pattern(*, ci_pattern: str) -> list[str]:
12-
"""Expand a CI pattern, treating shell-style globs as recursive globs.
13-
14-
Hidden directories (such as ``.venv``) are skipped to match bash's
15-
default globbing behaviour. Patterns without glob metacharacters are
16-
returned unchanged.
17-
"""
18-
if not any(char in ci_pattern for char in "*?["):
19-
return [ci_pattern]
20-
return [
21-
path.as_posix()
22-
for path in Path().glob(pattern=ci_pattern)
23-
if not any(part.startswith(".") for part in path.parts)
24-
]
25-
26-
2710
@beartype
2811
def _ci_patterns(*, repository_root: Path) -> set[str]:
2912
"""Return the CI patterns given in the CI configuration file."""
@@ -69,7 +52,7 @@ def _tests_from_pattern(*, ci_pattern: str) -> set[str]:
6952
# Unknown config option: retry_delay
7053
# ```
7154
"--disable-warnings",
72-
*_expand_pattern(ci_pattern=ci_pattern),
55+
ci_pattern,
7356
],
7457
plugins=[plugin],
7558
)
@@ -88,7 +71,7 @@ def test_ci_patterns_valid(request: pytest.FixtureRequest) -> None:
8871
collect_only_result = pytest.main(
8972
args=[
9073
"--collect-only",
91-
*_expand_pattern(ci_pattern=ci_pattern),
74+
ci_pattern,
9275
# Disable pytest-retry to avoid:
9376
# ```
9477
# ValueError: no option named 'filtered_exceptions'

0 commit comments

Comments
 (0)