From 412694e1c5ca77daba767c2a19d50f8b567f462b Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 26 Mar 2020 23:02:43 +0800 Subject: [PATCH] Tweak test and CI configs (#7866) * Set `jest` verbose to false by default * Correct `doc-debug.js` path * Remove outdated ignore patterns * Exclude Node.js 13 on macos --- .github/workflows/dev-test.yml | 3 +++ .github/workflows/prod-test.yml | 6 ++++++ jest.config.js | 6 +++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 660b2bff7..b72bfd810 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -24,6 +24,9 @@ jobs: - os: "ubuntu-latest" node: "12" ENABLE_CODE_COVERAGE: true + exclude: + - os: "macos-latest" + node: "13" env: ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }} name: Node.js ${{ matrix.node }} on ${{ matrix.os }} diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 2ee20d293..d144ba3d6 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -72,6 +72,9 @@ jobs: - "13" - "12" - "10" + exclude: + - os: "macos-latest" + node: "13" name: Node.js ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} needs: [build] @@ -110,6 +113,9 @@ jobs: - "13" - "12" - "10" + exclude: + - os: "macos-latest" + node: "13" env: STANDALONE: true name: Node.js ${{ matrix.node }} on ${{ matrix.os }} (standalone) diff --git a/jest.config.js b/jest.config.js index 8c7cd8b06..2299ca688 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,5 @@ "use strict"; +const { isCI } = require("ci-info"); const ENABLE_CODE_COVERAGE = !!process.env.ENABLE_CODE_COVERAGE; module.exports = { @@ -8,12 +9,11 @@ module.exports = { "jest-snapshot-serializer-ansi", ], testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$", - testPathIgnorePatterns: ["tests/new_react", "tests/more_react"], collectCoverage: ENABLE_CODE_COVERAGE, collectCoverageFrom: ["src/**/*.js", "index.js", "!/node_modules/"], coveragePathIgnorePatterns: [ "/standalone.js", - "/src/doc/doc-debug.js", + "/src/document/doc-debug.js", "/src/main/massage-ast.js", ], coverageReporters: ["text", "lcov"], @@ -33,5 +33,5 @@ module.exports = { "jest-watch-typeahead/filename", "jest-watch-typeahead/testname", ], - verbose: true, + verbose: isCI, };