diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index a3c6adb4..3f9e40e9 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -8,28 +8,23 @@ on: - "emulators/**" - "provenance/**" - "wiki/**" - # Every script the build runs or imports (tests/test_workflow_paths.py). + # Every script the build runs or imports, and no other + # (tests/test_workflow_paths.py). - "scripts/artifacts.py" - - "scripts/auto_fetch.py" - "scripts/common.py" - "scripts/cross_reference.py" - "scripts/crypto_verify.py" - "scripts/derivations.py" - - "scripts/deterministic_zip.py" - "scripts/dumpcatalog.py" - - "scripts/generate_pack.py" - "scripts/generate_readme.py" - "scripts/generate_site.py" - "scripts/hashing.py" - "scripts/largefiles.py" - - "scripts/list_platforms.py" - - "scripts/manifestselect.py" - "scripts/nativemode.py" - "scripts/packextras.py" - "scripts/packpaths.py" - "scripts/packreadme.py" - "scripts/packresolve.py" - - "scripts/packverify.py" - "scripts/profile_sync.py" - "scripts/provenance_report.py" - "scripts/refresh_data_dirs.py" @@ -41,7 +36,6 @@ on: - "scripts/siterender.py" - "scripts/sitesources.py" - "scripts/sitewrite.py" - - "scripts/slot.py" - "scripts/slots.py" - "scripts/split_pack.py" - "scripts/truth.py" @@ -52,7 +46,6 @@ on: - "scripts/verify.py" - "scripts/ziptools.py" - "schemas/**" - - "tests/**" - "docs_assets/**" - "install/**" - "install.py" diff --git a/tests/test_workflow_paths.py b/tests/test_workflow_paths.py index 9cf03836..64e4de62 100644 --- a/tests/test_workflow_paths.py +++ b/tests/test_workflow_paths.py @@ -84,6 +84,12 @@ class DeploySiteTriggers(unittest.TestCase): if not any(fnmatch.fnmatch(path, p.replace("**", "*")) for p in patterns) ) self.assertEqual(uncovered, []) + # And no script the build no longer reaches: generate_pack.py and six + # others stayed listed after the site stopped importing the builder, + # and a push touching only them rebuilt the site for nothing. + listed = {p for p in patterns if p.startswith("scripts/") and p.endswith(".py")} + self.assertEqual(sorted(listed - closure(entry_points)), []) + self.assertNotIn("tests/**", patterns) class DocumentedSteps(unittest.TestCase):