cobertura test coverage data for test job (ref. #9)

merge-requests/2/head
Michał 'rysiek' Woźniak 2021-09-01 02:38:40 +00:00
rodzic 9d0155771c
commit 3295620ece
3 zmienionych plików z 13 dodań i 2 usunięć

1
.gitignore vendored
Wyświetl plik

@ -1,3 +1,4 @@
node_modules/ node_modules/
radata/ radata/
coverage/ coverage/
junit.xml

Wyświetl plik

@ -8,25 +8,30 @@ cache:
key: "${CI_COMMIT_REF_SLUG}" key: "${CI_COMMIT_REF_SLUG}"
paths: paths:
- node_modules/ - node_modules/
libresilient-test: libresilient-test:
stage: test stage: test
script: script:
- npm ci --include=dev - npm ci --include=dev
- npx jest --coverage --ci --reporters=default --reporters=jest-junit - npx jest --collectCoverage --coverageDirectory="./coverage" --coverage --ci --reporters=default --reporters=jest-junit
coverage: "/All files[^|]*\\|[^|]*\\s+([\\d\\.]+)/" coverage: "/All files[^|]*\\|[^|]*\\s+([\\d\\.]+)/"
artifacts: artifacts:
when: always when: always
reports: reports:
junit: junit:
- junit.xml - junit.xml
cobertura: coverage/cobertura-coverage.xml
tags: tags:
- libresilient - libresilient
stages: stages:
- test - test
sast: sast:
stage: test stage: test
tags: tags:
- docker - docker
- linux - linux
include: include:
- template: Security/SAST.gitlab-ci.yml - template: Security/SAST.gitlab-ci.yml

Wyświetl plik

@ -1,4 +1,9 @@
{ {
"jest": {
"collectCoverageFrom": ["**/*.js", "!**/node_modules/**", "!**/lib/**"],
"coverageReporters": ["text", "text-summary", "cobertura"],
"testMatch": ["**/*.test.js"]
},
"devDependencies": { "devDependencies": {
"eslint": "^7.32.0", "eslint": "^7.32.0",
"jest": "^27.0.6", "jest": "^27.0.6",