Skip to content

Commit

Permalink
Tweak test and CI configs (prettier#7866)
Browse files Browse the repository at this point in the history
* Set `jest` verbose to false by default

* Correct `doc-debug.js` path

* Remove outdated ignore patterns

* Exclude Node.js 13 on macos
  • Loading branch information
fisker authored Mar 26, 2020
1 parent 302dbc3 commit 412694e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dev-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/prod-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";
const { isCI } = require("ci-info");
const ENABLE_CODE_COVERAGE = !!process.env.ENABLE_CODE_COVERAGE;

module.exports = {
Expand All @@ -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", "!<rootDir>/node_modules/"],
coveragePathIgnorePatterns: [
"<rootDir>/standalone.js",
"<rootDir>/src/doc/doc-debug.js",
"<rootDir>/src/document/doc-debug.js",
"<rootDir>/src/main/massage-ast.js",
],
coverageReporters: ["text", "lcov"],
Expand All @@ -33,5 +33,5 @@ module.exports = {
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname",
],
verbose: true,
verbose: isCI,
};

0 comments on commit 412694e

Please sign in to comment.