Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_ci_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ def test_a_workflow_reaches_its_own_jobs(self):
self.assertEqual(self.jobs(".github/workflows/lint.yml"), {"lint"})
self.assertEqual(self.jobs(".github/workflows/prepare-release.yml"), set())

def test_a_stub_reaches_the_tests_and_the_wheel_not_the_firmware_build(self):
self.assertEqual(self.jobs("src/audiometer/audiometer.pyi"), {"unit", "wheels"})
def test_a_stub_reaches_the_tests_the_wheel_and_the_interpreter_build(self):
# The comparison with the MicroPython module runs only in the build.
self.assertEqual(self.jobs("src/audiometer/audiometer.pyi"), {"unit", "wheels", "build"})
self.assertEqual(self.jobs("tests/test_stubs_match_modules.py"), {"lint", "unit", "build"})
self.assertEqual(self.jobs(".github/workflows/stubs.yml"), set())

def test_the_sources_packaging_and_unknown_files_reach_everything(self):
Expand Down
8 changes: 6 additions & 2 deletions tools/ci_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@
(".github/workflows/publish-release-packages.yml", ()),
(".github/workflows/tag-release.yml", ()),
# A type stub reaches the wheel, which carries it, and the test that holds
# it to its module. The Stubs workflow runs mypy over it on its own.
("src/*/*.pyi", ("unit", "wheels")),
# it to its module. That test compares every stub with the module built
# into MicroPython, and the interpreter build is the only job that has one,
# so a stub or the test also reaches "build". The Stubs workflow runs mypy
# over a stub on its own.
("src/*/*.pyi", ("unit", "wheels", "build")),
("tests/test_stubs_match_modules.py", ("lint", "unit", "build")),
# flake8 reads the examples; nothing else does.
("examples/**", ("lint",)),
(".flake8", ("lint",)),
Expand Down
Loading