1
0
Fork 0

chore: Added code coverage

This commit is contained in:
joostdecock 2022-07-23 14:50:32 +02:00
parent 7d91624b97
commit 21434ed2f6
6 changed files with 15 additions and 7 deletions

View file

@ -38,4 +38,10 @@ jobs:
run: npm run buildall
- name: Run all tests
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

View file

@ -24,10 +24,9 @@ components:
storybook: 'start-storybook -p 6663'
test: *notests
core:
coverage: 'nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'
report: 'nyc report --reporter=html'
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'
i18n:
# react-scripts doesn't handle .mjs files correctly

View file

@ -67,7 +67,7 @@
"chai": "^4.2.0",
"chai-string": "^1.5.0",
"chalk": "^4.1.0",
"codecov": "^3.7.2",
"codecov": "^3.8.3",
"cross-env": "^7.0.2",
"esbuild": "^0.14.43",
"esbuild-plugin-yaml": "^0.0.1",

View file

@ -0,0 +1,4 @@
exclude:
- tests/fixtures
- bin-pack

View file

@ -36,9 +36,8 @@
"vbuild": "VERBOSE=1 node build.js",
"lab": "cd ../../sites/lab && yarn start",
"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",
"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",
"cibuild_step0": "node build.js"
},

View file

@ -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"
integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==
codecov@^3.7.2:
codecov@^3.7.2, codecov@^3.8.3:
version "3.8.3"
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7"
integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==