diff --git a/.github/workflows/tests.all.yml b/.github/workflows/tests.all.yml index ce45a233e60..7b3033fc6ed 100644 --- a/.github/workflows/tests.all.yml +++ b/.github/workflows/tests.all.yml @@ -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 diff --git a/config/scripts.yaml b/config/scripts.yaml index d4759e0654a..e6492df9797 100644 --- a/config/scripts.yaml +++ b/config/scripts.yaml @@ -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 diff --git a/package.json b/package.json index 091d3bc358f..a722830b65d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/core/.nycrc.yaml b/packages/core/.nycrc.yaml new file mode 100644 index 00000000000..8e787be9169 --- /dev/null +++ b/packages/core/.nycrc.yaml @@ -0,0 +1,4 @@ +exclude: + - tests/fixtures + - bin-pack + diff --git a/packages/core/package.json b/packages/core/package.json index 4c3e1c3ae8d..89fd1a6d735 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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" }, diff --git a/yarn.lock b/yarn.lock index 10caf2cb582..62908cbba92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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==