sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #05797
[Merge] ~adam-collard/maas-site-manager:junit-xml-output into maas-site-manager:main
Adam Collard has proposed merging ~adam-collard/maas-site-manager:junit-xml-output into maas-site-manager:main.
Commit message:
Add junit.xml reporting to backend and frontend tests
Requested reviews:
MAAS Committers (maas-committers)
For more details, see:
https://code.launchpad.net/~adam-collard/maas-site-manager/+git/site-manager/+merge/438545
--
Your team MAAS Committers is requested to review the proposed merge of ~adam-collard/maas-site-manager:junit-xml-output into maas-site-manager:main.
diff --git a/.gitignore b/.gitignore
index c2f1c8d..c299531 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,5 @@ logs
/backend/.tox
/backend/build
+# CI
+junit*.xml
diff --git a/Makefile b/Makefile
index 68bb329..ca1e195 100644
--- a/Makefile
+++ b/Makefile
@@ -48,29 +48,29 @@ ci-backend-build: # nothing to do since everything is run in tox envs
.PHONY: ci-backend-build
ci-backend-lint:
- cd backend && tox -e lint,check
+ env -C backend tox -e lint,check
.PHONY: ci-backend-lint
ci-backend-test:
- cd backend && tox -e test
+ env -C backend tox -e test -- --junit-xml=../junit-backend.xml
.PHONY: ci-test
# Frontend CI targets
ci-frontend-dep: install-frontend-dependencies
- cd frontend && yarnpkg install
+ env -C frontend yarnpkg install
.PHONY: ci-frontend-dep
-ci-frontend-build: # nothing to do since everything is run in tox envs
- cd frontend && yarnpkg run build
+ci-frontend-build:
+ env -C frontend yarnpkg run build
.PHONY: ci-frontend-build
ci-frontend-lint:
- cd frontend && yarnpkg run lint
+ env -C frontend yarnpkg run lint
.PHONY: ci-frontend-lint
ci-frontend-test:
- cd frontend && yarnpkg run test -- --silent run
+ env -C frontend VITEST_JUNIT_SUITE_NAME='maas-site-manager frontend tests' yarnpkg run test --silent --reporter=junit --reporter=default --outputFile.junit=../junit-frontend.xml run
.PHONY: ci-test
diff --git a/backend/pyproject.toml b/backend/pyproject.toml
index d7d98a4..f5c7d8a 100644
--- a/backend/pyproject.toml
+++ b/backend/pyproject.toml
@@ -16,6 +16,8 @@ use_parentheses = true
testpaths = [
"msm/"
]
+junit_logging = 'all'
+junit_suite_name = 'maas-site-manager backend tests'
[tool.mypy]
install_types = true
Follow ups