From 32d37fdf59eff7e69f63b6e182dbfcea7ef34a0c Mon Sep 17 00:00:00 2001 From: Arthur Araujo Date: Mon, 29 Jan 2024 23:08:47 -0300 Subject: [PATCH] Properly generating coverage report from c8 --- .c8rc.json | 6 ++++++ .github/workflows/Checks.yml | 7 ++++--- .gitignore | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .c8rc.json diff --git a/.c8rc.json b/.c8rc.json new file mode 100644 index 000000000..182358a3e --- /dev/null +++ b/.c8rc.json @@ -0,0 +1,6 @@ +{ + "all": true, + "include": ["js/**.{cjs,js,mjs}", "js/classes/**.{cjs,js,mjs}", "src/**.{cjs,js,mjs}", "./main.{cjs,js,mjs}"], + "reporter": ["clover", "json", "lcov", "text"], + "reportsDir": "coverage_c8" +} \ No newline at end of file diff --git a/.github/workflows/Checks.yml b/.github/workflows/Checks.yml index 1dc8ef46d..7e299bd1a 100644 --- a/.github/workflows/Checks.yml +++ b/.github/workflows/Checks.yml @@ -53,18 +53,19 @@ jobs: export DISPLAY=':99' fi - npm run test:jest npm run test:electron-mocha-main + npm run test:jest - name: ' Create COV_REPORT' run: | mkdir COV_REPORT - - name: ' Copy jest results' + - name: ' Copy coverage results' run: | + cp coverage_c8/coverage-final.json COV_REPORT/coverage-final-c8.json cp coverage_jest/coverage-final.json COV_REPORT/coverage-final-jest.json - name: ' CodeCov' uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: COV_REPORT/coverage-final-jest.json + files: COV_REPORT/coverage-final-c8.json,COV_REPORT/coverage-final-jest.json name: codecov-${{ matrix.os }} verbose: true diff --git a/.gitignore b/.gitignore index f4da6554f..ccd44bd0e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ lib-cov # Coverage directory used by tools like istanbul coverage +coverage_c8 coverage_jest *.lcov