Skip to content

Commit f018fd1

Browse files
committed
CCM-17830: Make coverage report merging a makefile command
1 parent d8a05d6 commit f018fd1

4 files changed

Lines changed: 169 additions & 5 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ jobs:
5858
cd sandbox
5959
npm run test
6060
cd -
61-
mkdir coverage coverage-temp
62-
TMPDIR="./coverage-temp" npx lcov-result-merger sandbox/coverage/lcov.info coverage/lcov.info --prepend-source-files
63-
rm -r coverage-temp
64-
rm -rf sandbox/coverage/tmp
61+
make merge-coverage-reports
6562
6663
- name: Check licenses
6764
run: make check-licenses

‎Makefile‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ install-hooks: .git/hooks/pre-commit
2424
lint: .check-licenses .ensure-test-documentation-validity .lint-js .lint-python
2525
npm run lint
2626

27+
merge-coverage-reports:
28+
mkdir -p coverage coverage-temp
29+
TMPDIR="./coverage-temp" npm run merge-coverage-reports
30+
rm -r coverage-temp
31+
rm -rf sandbox/coverage/tmp
32+
2733
static-analysis:
2834
npm run static-analysis
2935

‎package-lock.json‎

Lines changed: 159 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"sandbox-postman-collection": "newman run postman/NhsNotify.Sandbox.postman_collection.json",
1212
"integration-postman-collection": "poetry run python scripts/build_postman_environment.py && newman run postman/NhsNotify.Integration.postman_collection.json -e postman/Integration.test.postman_environment.json",
1313
"static-analysis": "./scripts/perform-static-analysis.sh",
14-
"zap-security-scan": "./scripts/run_zap.sh"
14+
"zap-security-scan": "./scripts/run_zap.sh",
15+
"merge-coverage-reports": "lcov-result-merger sandbox/coverage/lcov.info coverage/lcov.info --prepend-source-files"
1516
},
1617
"author": "NHS Digital",
1718
"license": "MIT",
@@ -41,6 +42,7 @@
4142
"eslint-plugin-workspaces": "^0.11.0",
4243
"eslint-plugin-yml": "^1.2.0",
4344
"handlebars": "^4.7.9",
45+
"lcov-result-merger": "^6.0.0",
4446
"license-checker": "^25.0.1",
4547
"minimist": "^1.2.2",
4648
"newman": "^6.2.2",

0 commit comments

Comments
 (0)