From 7f1d4913d1164e450a4e9113568ee9a15195a360 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Mon, 17 Oct 2022 08:25:32 +0800 Subject: [PATCH] Fix codecov status check (#13646) --- .codecov.yml | 2 +- .github/workflows/dev-test.yml | 1 + jest.config.mjs | 5 +++-- package.json | 8 ++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 1a43c767b..5da2f9bd4 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,4 +1,4 @@ -comment: off +comment: false coverage: status: diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 2b0e8107c..8b4d05e11 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -72,3 +72,4 @@ jobs: if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true + files: coverage/lcov.info diff --git a/jest.config.mjs b/jest.config.mjs index ed1aac1f3..63dfbfb13 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -4,7 +4,8 @@ import installPrettier from "./tests/config/install-prettier.js"; const { dirname: PROJECT_ROOT } = createEsmUtils(import.meta); const isProduction = process.env.NODE_ENV === "production"; -const ENABLE_CODE_COVERAGE = Boolean(process.env.ENABLE_CODE_COVERAGE); +// Disabled https://github.com/nicolo-ribaudo/jest-light-runner/pull/13 +// const ENABLE_CODE_COVERAGE = Boolean(process.env.ENABLE_CODE_COVERAGE); const TEST_STANDALONE = Boolean(process.env.TEST_STANDALONE); const INSTALL_PACKAGE = Boolean(process.env.INSTALL_PACKAGE); // When debugging production test, this flag can skip installing package @@ -58,7 +59,7 @@ const config = { "/tests/unit/**/*.js", ], testPathIgnorePatterns, - collectCoverage: ENABLE_CODE_COVERAGE, + // collectCoverage: ENABLE_CODE_COVERAGE, collectCoverageFrom: ["/src/**/*.js", "/bin/**/*.js"], coveragePathIgnorePatterns: [ "/src/standalone.js", diff --git a/package.json b/package.json index 846a54b6f..07047b56f 100644 --- a/package.json +++ b/package.json @@ -181,6 +181,14 @@ "reporter": [ "lcov", "text" + ], + "include": [ + "src/**", + "bin/**" + ], + "exclude": [ + "src/standalone.js", + "src/document/debug.js" ] }, "browserslist": [