Skip to content

Commit d380e8b

Browse files
committed
[red] Cover portable CI dependencies and goldens
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent bd5f5d2 commit d380e8b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

‎tests/publication/test_ci_contract.py‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,37 @@ def test_firmware_host_checks_out_pinned_submodules(self) -> None:
2424
" submodules: true\n",
2525
firmware_host,
2626
)
27+
self.assertIn(
28+
" - name: Initialize pinned MicroPython host dependency\n"
29+
" run: |\n"
30+
" git -C firmware/upstream/micropython submodule update "
31+
"--init --depth 1 \\\n"
32+
" lib/micropython-lib\n",
33+
firmware_host,
34+
)
35+
36+
def test_pixel_goldens_run_on_pinned_macos(self) -> None:
37+
workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(
38+
encoding="utf-8"
39+
)
40+
app_start = workflow.index(" app:")
41+
goldens_start = workflow.index("\n app-goldens:", app_start)
42+
android_start = workflow.index("\n android-webview:", goldens_start)
43+
app = workflow[app_start:goldens_start]
44+
goldens = workflow[goldens_start:android_start]
45+
android = workflow[android_start:]
46+
47+
self.assertIn("run: flutter test --exclude-tags golden", app)
48+
self.assertIn("runs-on: macos-15", goldens)
49+
self.assertIn("run: flutter test --tags golden", goldens)
50+
self.assertIn("needs: [app, app-goldens]", android)
51+
52+
for relative in (
53+
"app/test/golden/app_shell_golden_test.dart",
54+
"app/test/golden/about_page_golden_test.dart",
55+
):
56+
source = (REPO_ROOT / relative).read_text(encoding="utf-8")
57+
self.assertIn("tags: const ['golden']", source)
2758

2859

2960
if __name__ == "__main__":

0 commit comments

Comments
 (0)