diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a2fff477d..450c196c3d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,9 +19,6 @@ jobs: parameters: node-version: type: string - partial: - type: boolean - default: false working_directory: ~/jest executor: node/default steps: @@ -29,16 +26,8 @@ jobs: - node/install: node-version: << parameters.node-version >> - node/install-packages: *install - - when: - condition: << parameters.partial >> - steps: - - run: - command: yarn test-ci-partial - - unless: - condition: << parameters.partial >> - steps: - - run: - command: yarn test-ci + - run: + command: yarn test-ci-partial - store_test_results: path: reports/junit @@ -59,14 +48,9 @@ jobs: workflows: build-and-deploy: jobs: - - test-node: - matrix: - parameters: - node-version: ['lts/*'] - test-node: name: test-node-partial-<< matrix.node-version >> - partial: true matrix: parameters: - node-version: ['12', '14', '17'] + node-version: ['12', '14', '16', '17'] - test-jest-jasmine diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000000..ac4bb1e7e9 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,13 @@ +codecov: + require_ci_to_pass: false + +comment: false + +coverage: + status: + patch: + default: + target: auto + project: + default: + target: auto diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 95e0f67f19..5011cab267 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -133,3 +133,34 @@ jobs: uses: SimenB/github-actions-cpu-cores@v1 - name: run tests using jest-jasmine run: yarn jest-jasmine-ci --max-workers ${{ steps.cpu-cores.outputs.count }} + + test-coverage: + name: Node LTS on Ubuntu with coverage + runs-on: ubuntu-latest + needs: prepare-yarn-cache + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js LTS + uses: actions/setup-node@v2 + with: + node-version: lts/* + cache: yarn + - name: install + run: yarn --immutable + - name: build + run: yarn build:js + - name: Get number of CPU cores + id: cpu-cores + uses: SimenB/github-actions-cpu-cores@v1 + - name: run tests with coverage + run: | + yarn jest-coverage --color --config jest.config.ci.js --max-workers ${{ steps.cpu-cores.outputs.count }} + yarn test-leak + - name: map coverage + run: node ./scripts/mapCoverage.js + if: always() + - uses: codecov/codecov-action@v2 + if: always() + with: + directory: ./coverage diff --git a/package.json b/package.json index 1ccd2bc1fd..fc20a8e5a0 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "camelcase": "^6.2.0", "chalk": "^4.0.0", "chokidar": "^3.3.0", - "codecov": "^3.0.0", "debug": "^4.0.1", "dedent": "^0.7.0", "eslint": "^8.8.0", @@ -104,11 +103,10 @@ "lint:prettier:ci": "prettier '**/*.{md,yml,yaml}' 'website/**/*.{css,js}' --check --ignore-path .gitignore", "remove-examples": "node ./scripts/remove-examples.js", "test-types": "yarn jest --config jest.config.tsd.js", - "test-ci": "yarn jest-coverage --color -i --config jest.config.ci.js && yarn test-leak && node ./scripts/mapCoverage.js && codecov", "test-ci-partial": "yarn test-ci-partial:parallel -i", "test-ci-partial:parallel": "yarn jest --color --config jest.config.ci.js", "test-pretty-format-perf": "node packages/pretty-format/perf/test.js", - "test-leak": "yarn jest -i --detectLeaks jest-mock jest-diff jest-repl pretty-format", + "test-leak": "yarn jest -i --detectLeaks --color jest-mock jest-diff jest-repl pretty-format", "test": "yarn lint && yarn jest", "verify-old-ts": "node ./scripts/verifyOldTs.js", "verify-pnp": "node ./scripts/verifyPnP.js", diff --git a/yarn.lock b/yarn.lock index 7605889be9..5136a873bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2647,7 +2647,6 @@ __metadata: camelcase: ^6.2.0 chalk: ^4.0.0 chokidar: ^3.3.0 - codecov: ^3.0.0 debug: ^4.0.1 dedent: ^0.7.0 eslint: ^8.8.0 @@ -6268,13 +6267,6 @@ __metadata: languageName: node linkType: hard -"argv@npm:0.0.2": - version: 0.0.2 - resolution: "argv@npm:0.0.2" - checksum: e703f1af475dfd35f4065c21d7324368e3a9f1b5ff63d49c11fd442155aa0fd4f8498b57b535947fac86b79e1c9913cf0324300cbddbdc0af92fcf62eac0f5d2 - languageName: node - linkType: hard - "aria-query@npm:^5.0.0": version: 5.0.0 resolution: "aria-query@npm:5.0.0" @@ -7702,21 +7694,6 @@ __metadata: languageName: node linkType: hard -"codecov@npm:^3.0.0": - version: 3.8.2 - resolution: "codecov@npm:3.8.2" - dependencies: - argv: 0.0.2 - ignore-walk: 3.0.3 - js-yaml: 3.14.1 - teeny-request: 7.0.1 - urlgrey: 0.4.4 - bin: - codecov: bin/codecov - checksum: a70fdf2e83dace9018747781e63a564c935784ab62df966eebe7f6bacfd004a6f8b0c271fc9814fea21726e118501c35a05d65c74770b0573760c96e5dfa04d9 - languageName: node - linkType: hard - "collapse-white-space@npm:^1.0.2": version: 1.0.6 resolution: "collapse-white-space@npm:1.0.6" @@ -11845,7 +11822,7 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^4.0.0, http-proxy-agent@npm:^4.0.1": +"http-proxy-agent@npm:^4.0.1": version: 4.0.1 resolution: "http-proxy-agent@npm:4.0.1" dependencies: @@ -11974,7 +11951,7 @@ __metadata: languageName: node linkType: hard -"ignore-walk@npm:3.0.3, ignore-walk@npm:^3.0.3": +"ignore-walk@npm:^3.0.3": version: 3.0.3 resolution: "ignore-walk@npm:3.0.3" dependencies: @@ -13746,7 +13723,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:3.14.1, js-yaml@npm:^3.13.1": +"js-yaml@npm:^3.13.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -20548,15 +20525,6 @@ __metadata: languageName: node linkType: hard -"stream-events@npm:^1.0.5": - version: 1.0.5 - resolution: "stream-events@npm:1.0.5" - dependencies: - stubs: ^3.0.0 - checksum: 969ce82e34bfbef5734629cc06f9d7f3705a9ceb8fcd6a526332f9159f1f8bbfdb1a453f3ced0b728083454f7706adbbe8428bceb788a0287ca48ba2642dc3fc - languageName: node - linkType: hard - "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -20803,13 +20771,6 @@ __metadata: languageName: node linkType: hard -"stubs@npm:^3.0.0": - version: 3.0.0 - resolution: "stubs@npm:3.0.0" - checksum: dec7b82186e3743317616235c59bfb53284acc312cb9f4c3e97e2205c67a5c158b0ca89db5927e52351582e90a2672822eeaec9db396e23e56893d2a8676e024 - languageName: node - linkType: hard - "style-to-object@npm:0.3.0, style-to-object@npm:^0.3.0": version: 0.3.0 resolution: "style-to-object@npm:0.3.0" @@ -20969,19 +20930,6 @@ __metadata: languageName: node linkType: hard -"teeny-request@npm:7.0.1": - version: 7.0.1 - resolution: "teeny-request@npm:7.0.1" - dependencies: - http-proxy-agent: ^4.0.0 - https-proxy-agent: ^5.0.0 - node-fetch: ^2.6.1 - stream-events: ^1.0.5 - uuid: ^8.0.0 - checksum: 8eba49422edc141cff2c4a4c2bc39c78d92b6a9ce0fbf1a9edd0d3a57b830f719a1030a5681c2890a7d222c7ebcb74b7a8c29b37ad7b124d34be728cacfd128b - languageName: node - linkType: hard - "temp-dir@npm:^1.0.0": version: 1.0.0 resolution: "temp-dir@npm:1.0.0" @@ -22087,13 +22035,6 @@ __metadata: languageName: node linkType: hard -"urlgrey@npm:0.4.4": - version: 0.4.4 - resolution: "urlgrey@npm:0.4.4" - checksum: db5884ffca497430eb99fcf7bd88402ff3647c1ba7b5687c595d3af884afc198399301ec181582501ff61074d9bf342ad12825eb11aa020bc6aeae7bc815a04c - languageName: node - linkType: hard - "use-composed-ref@npm:^1.0.0": version: 1.2.1 resolution: "use-composed-ref@npm:1.2.1" @@ -22193,7 +22134,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^8.0.0, uuid@npm:^8.3.1, uuid@npm:^8.3.2": +"uuid@npm:^8.3.1, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: