Skip to content

Commit bd5f5d2

Browse files
committed
[red] Cover clean Linux publication dependencies
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 4b22922 commit bd5f5d2

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: MIT
2+
# Part of PyBLE (https://pyble.dev) — see /LICENSE.
3+
4+
from __future__ import annotations
5+
6+
import unittest
7+
from pathlib import Path
8+
9+
REPO_ROOT = Path(__file__).resolve().parents[2]
10+
11+
12+
class CiContractTest(unittest.TestCase):
13+
def test_firmware_host_checks_out_pinned_submodules(self) -> None:
14+
workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text(
15+
encoding="utf-8"
16+
)
17+
start = workflow.index(" firmware-host:")
18+
end = workflow.index("\n app:", start)
19+
firmware_host = workflow[start:end]
20+
21+
self.assertIn(
22+
" - uses: actions/checkout@v4\n"
23+
" with:\n"
24+
" submodules: true\n",
25+
firmware_host,
26+
)
27+
28+
29+
if __name__ == "__main__":
30+
unittest.main()

‎tools/web/src/test/build-contract.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ describe("production build contract", () => {
9494
notice,
9595
"node_modules/string.prototype.codepointat",
9696
);
97+
const hexRgb = noticeSection(notice, "node_modules/hex-rgb");
9798
const pako = noticeSection(
9899
notice,
99100
"node_modules/esptool-js/node_modules/pako",
@@ -103,6 +104,7 @@ describe("production build contract", () => {
103104
expect.soft(base64).not.toContain("Meta Platforms");
104105
expect.soft(codePointAt).toContain("Copyright Mathias Bynens");
105106
expect.soft(codePointAt).not.toContain("Meta Platforms");
107+
expect.soft(hexRgb).toContain("License file: license");
106108
expect.soft(pako).toContain("SPDX license: (MIT AND Zlib)");
107109
expect.soft(pako).toContain("Jean-loup Gailly and Mark Adler");
108110
expect

0 commit comments

Comments
 (0)