chore: Added code coverage
This commit is contained in:
parent
7d91624b97
commit
21434ed2f6
6 changed files with 15 additions and 7 deletions
8
.github/workflows/tests.all.yml
vendored
8
.github/workflows/tests.all.yml
vendored
|
@ -38,4 +38,10 @@ jobs:
|
||||||
run: npm run buildall
|
run: npm run buildall
|
||||||
- name: Run all tests
|
- name: Run all tests
|
||||||
run: npm run testall
|
run: npm run testall
|
||||||
|
- name: Upload to codecov.io
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
files: ./packages/core/coverage/coverage-final.json
|
||||||
|
flags: core
|
||||||
|
name: codecov-core
|
||||||
|
fail_ci_if_error: true
|
||||||
|
|
|
@ -24,10 +24,9 @@ components:
|
||||||
storybook: 'start-storybook -p 6663'
|
storybook: 'start-storybook -p 6663'
|
||||||
test: *notests
|
test: *notests
|
||||||
core:
|
core:
|
||||||
coverage: 'nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'
|
|
||||||
report: 'nyc report --reporter=html'
|
report: 'nyc report --reporter=html'
|
||||||
test: 'nyc -x node_modules -x tests/fixtures -x bin-pack npx mocha tests/*.test.js'
|
test: 'nyc -x node_modules -x tests/fixtures -x bin-pack npx mocha tests/*.test.js'
|
||||||
testci: "npx mocha tests/*.test.js --reporter ../../tests/reporters/terse.js"
|
testci: "nyc --silent npx mocha tests/*.test.js --reporter ../../tests/reporters/terse.js && nyc report --reporter=json"
|
||||||
testonly: 'npx mocha tests/*.test.js'
|
testonly: 'npx mocha tests/*.test.js'
|
||||||
i18n:
|
i18n:
|
||||||
# react-scripts doesn't handle .mjs files correctly
|
# react-scripts doesn't handle .mjs files correctly
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"chai-string": "^1.5.0",
|
"chai-string": "^1.5.0",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"codecov": "^3.7.2",
|
"codecov": "^3.8.3",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"esbuild": "^0.14.43",
|
"esbuild": "^0.14.43",
|
||||||
"esbuild-plugin-yaml": "^0.0.1",
|
"esbuild-plugin-yaml": "^0.0.1",
|
||||||
|
|
4
packages/core/.nycrc.yaml
Normal file
4
packages/core/.nycrc.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
exclude:
|
||||||
|
- tests/fixtures
|
||||||
|
- bin-pack
|
||||||
|
|
|
@ -36,9 +36,8 @@
|
||||||
"vbuild": "VERBOSE=1 node build.js",
|
"vbuild": "VERBOSE=1 node build.js",
|
||||||
"lab": "cd ../../sites/lab && yarn start",
|
"lab": "cd ../../sites/lab && yarn start",
|
||||||
"tips": "node ../../scripts/help.mjs",
|
"tips": "node ../../scripts/help.mjs",
|
||||||
"coverage": "nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov",
|
|
||||||
"report": "nyc report --reporter=html",
|
"report": "nyc report --reporter=html",
|
||||||
"testci": "npx mocha tests/*.test.js --reporter ../../tests/reporters/terse.js",
|
"testci": "nyc --silent npx mocha tests/*.test.js --reporter ../../tests/reporters/terse.js && nyc report --reporter=json",
|
||||||
"testonly": "npx mocha tests/*.test.js",
|
"testonly": "npx mocha tests/*.test.js",
|
||||||
"cibuild_step0": "node build.js"
|
"cibuild_step0": "node build.js"
|
||||||
},
|
},
|
||||||
|
|
|
@ -6826,7 +6826,7 @@ code-point-at@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||||
integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==
|
integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==
|
||||||
|
|
||||||
codecov@^3.7.2:
|
codecov@^3.7.2, codecov@^3.8.3:
|
||||||
version "3.8.3"
|
version "3.8.3"
|
||||||
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7"
|
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7"
|
||||||
integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==
|
integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue