Skip to content

Commit

Permalink
chore: update to improve performance using v8 rather than babel for c…
Browse files Browse the repository at this point in the history
…ode coverage (microsoft#4388)

* Disabeled the default babel and let V8 to run test

* add yarn test --coverage linux env

* coverage on windows machine

* run jest coverage locally

* change npx to yarn

* add coverage to macos

* updade on code coverage with jest

* code climate action bump 2.7.5 on CI

* change cmd yarn run coverage to coverage

* provide coverage location as wild card

* cmd yarn run coverage

* cmd yarn learna run coverage

* a need to have playwright on CI

* restructured CI workflow for code coverage

* remove playwright install fro CI

* move code coverage to ci-daily

* include learna in run coverage

Co-authored-by: Aaron Wentzel <16669785+awentzel@users.noreply.github.com>
  • Loading branch information
Ibrahimmaga and awentzel authored Mar 3, 2021
1 parent 76f8fbf commit 6f61475
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 63 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ jobs:
run: lerna run test --stream

- name: Collect and upload code coverage to Code Climate
uses: paambaati/codeclimate-action@v2.6.0
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
coverageCommand: lerna run coverage
coverageCommand: yarn lerna run coverage
coverageLocations: |
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
run: lerna run prettier:diff

- name: Testing unit tests
run: lerna run test --stream

run: lerna run test --stream
- name: Publish NPM changed packages
run: |
npm run beachball-publish -- -b origin/master -n $(npmToken) --access public -y
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/ci-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,6 @@ jobs:
yarn test-firefox:pw
yarn test-webkit:pw
- name: Collect and upload code coverage to Code Climate
uses: paambaati/codeclimate-action@v2.6.0

env:
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32
with:
coverageCommand: yarn lerna run coverage
coverageLocations: |
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov
debug: false

windows_cross-platform_cross-browser:
runs-on: [windows-latest]

Expand Down Expand Up @@ -112,25 +93,6 @@ jobs:
yarn test-firefox:pw
yarn test-webkit:pw
- name: Collect and upload code coverage to Code Climate
uses: paambaati/codeclimate-action@v2.6.0

env:
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32
with:
coverageCommand: yarn lerna run coverage
coverageLocations: |
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov
debug: false

macos_cross-platform_cross-browser:
runs-on: [macos-latest]

Expand Down Expand Up @@ -168,22 +130,3 @@ jobs:
yarn test-chromium:pw
yarn test-firefox:pw
yarn test-webkit:pw
- name: Collect and upload code coverage to Code Climate
uses: paambaati/codeclimate-action@v2.6.0

env:
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32
with:
coverageCommand: yarn lerna run coverage
coverageLocations: |
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov
debug: false
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"prepare": "lerna run prepare",
"test": "yarn eslint \"/**/*.{ts}\"",
"unit-tests": "jest --maxWorkers=4",
"coverage": "yarn jest --coverage",
"unit-tests:watch": "jest --watch",
"watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput",
"format:check": "lerna run prettier:diff",
Expand All @@ -59,7 +60,7 @@
}
},
"jest": {
"collectCoverage": false,
"collectCoverage": true,
"collectCoverageFrom": [
"build/helpers/*.ts"
],
Expand All @@ -83,7 +84,7 @@
"testURL": "http://localhost",
"transform": {
"^.+\\.ts?$": "ts-jest",
"^.+\\.js?$": "babel-jest"
"^.+\\.js?$": "babel-jest"
},
"transformIgnorePatterns": [
"!<rootDir>/node_modules/lodash-es",
Expand Down

0 comments on commit 6f61475

Please sign in to comment.