From 7c37d26a259ae4c139992a582e0e6f1069405081 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 25 Dec 2023 23:43:32 +0100 Subject: [PATCH] build(ci): fix coverage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .github/workflows/ci.yml | 5 ----- .mocharc.json | 2 +- package.json | 2 +- sonar-project.properties | 3 ++- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58a8fe5e..f76dda13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,11 +57,6 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }} run: pnpm coverage - # - name: Fix Coverage Report Paths - # if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }} - # working-directory: ./coverage - # run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' lcov.info - - name: Check for SonarCloud Token Availability id: sonar-token shell: bash diff --git a/.mocharc.json b/.mocharc.json index f6014cbe..676d4f02 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -6,7 +6,7 @@ "timeout": 20000, "full-trace": true, "exit": true, - "enable-source-maps": false, + "enable-source-maps": true, "reporter": "mochawesome", "reporter-options": "reportDir=outputs/mochawesome-report,json=false", "require": ["mochawesome/register"] diff --git a/package.json b/package.json index d6f2cdfb..7b903032 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "benchmark": "pnpm build && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs", "benchmark:prod": "pnpm build:prod && node --max-old-space-size=8192 --enable-source-maps benchmarks/internal/bench.mjs", "benchmark:debug": "pnpm build && node --max-old-space-size=8192 --enable-source-maps --inspect benchmarks/internal/bench.mjs", - "test": "pnpm build --environment SOURCEMAP:true && cross-env NODE_ENV=test c8 mocha 'tests/**/*.test.mjs'", + "test": "pnpm build --environment SOURCEMAP:false && cross-env NODE_ENV=test c8 mocha 'tests/**/*.test.mjs'", "test:debug": "pnpm build && cross-env NODE_ENV=test mocha --no-parallel --inspect 'tests/**/*.test.mjs'", "coverage": "c8 report --reporter=lcov", "coverage:html": "c8 report --reporter=html", diff --git a/sonar-project.properties b/sonar-project.properties index 9b2cd3d1..86e3920f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,7 +4,8 @@ sonar.javascript.lcov.reportPaths=coverage/lcov.info sonar.projectName=poolifier sonar.projectVersion=3.1.11 sonar.host.url=https://sonarcloud.io -sonar.sources=src +#sonar.sources=src +sonar.sources=lib sonar.tests=tests #sonar.login=TOKEN # To use for local troubleshooting sonar.verbose=false -- 2.34.1