Skip to content

Commit cccdf97

Browse files
authored
ci(tests): add license-check (#4)
1 parent ba6dc5e commit cccdf97

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/test_cookiecutter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def test_default_project(cookies):
219219
for platform in ("linux/arm64", "linux/amd64"):
220220
env["PLATFORM"] = platform
221221
subprocess.run(
222-
["task", "-v", "build", "test", "sbom", "vulnscan"],
222+
["task", "-v", "build", "test", "sbom", "vulnscan", "license-check"],
223223
capture_output=True,
224224
check=True,
225225
cwd=project,
@@ -266,7 +266,7 @@ def test_default_project(cookies):
266266
f"Unexpected exit code when running {command}; expected {expected_exit}, received {process.returncode}"
267267
)
268268

269-
# Clean the repo, perform a multi-platform build, and then run the sbom and vulnscan task to ensure it all works
269+
# Clean the repo, perform a multi-platform build, and then run the sbom / vulnscan / license check tasks to ensure it all works
270270
# We cannot functionally test a multi-platform image without pushing it to a registry and then pulling it back down because they can't directly be
271271
# loaded into the docker daemon
272272
env["PLATFORM"] = "all"
@@ -278,6 +278,7 @@ def test_default_project(cookies):
278278
"build",
279279
"sbom",
280280
"vulnscan",
281+
"license-check",
281282
],
282283
capture_output=True,
283284
check=True,

{{cookiecutter.project_name|replace(" ", "")}}/tests/test_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ def test_multi_platform_build():
206206
env=env,
207207
)
208208

209-
# Test SBOM generation for specific platforms
209+
# Test SBOM generation, vuln scanning, and license checks for each supported platforms
210210
for platform in ["linux/amd64", "linux/arm64"]:
211211
env["PLATFORM"] = platform
212212
subprocess.run(
213-
["task", "-v", "sbom", "vulnscan"],
213+
["task", "-v", "sbom", "vulnscan", "license-check"],
214214
capture_output=True,
215215
check=True,
216216
cwd=project_root,

0 commit comments

Comments
 (0)