Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore coverage publishing #516

Merged
merged 17 commits into from
Feb 22, 2024
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ jobs:

- name: Run CI script
run: yarn run ci

- name: Collect coverage
if: matrix.node == '20'
run: yarn run merge-cover

- name: Coveralls
if: matrix.node == '20'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI script runs twice, on push and PR. It uploads the coverage twice. Could we do it only once, on push?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 😉
I limited publishing only for 'push' event.

uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
path-to-lcov: ./coverage/lcov.info

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
"node": ">=18.0.0 <21.0.0"
},
"scripts": {
"merge-cover": "lcov-result-merger 'coverage/lcov_*.info' > coverage/general.info",
"coveralls": "cat coverage/general.info | coveralls",
"clean": "rimraf coverage",
NataliaDSmirnova marked this conversation as resolved.
Show resolved Hide resolved
"merge-cover": "mkdirp coverage | lcov-result-merger 'packages/*/coverage/lcov.info' 'coverage/lcov.info' --prepend-source-files --prepend-path-fix '..'",
"ci": "yarn workspaces foreach -ptv run ci"
},
"devDependencies": {
"coveralls": "^3.1.0",
"lcov-result-merger": "^3.1.0"
"lcov-result-merger": "^5.0.0",
"mkdirp": "^3.0.1",
"rimraf": "^5.0.5"
},
"packageManager": "yarn@3.6.3"
}
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"scripts": {
"ci": "run-s clean lint test-cover build",
"clean": "rimraf 'build/*'",
"clean": "rimraf build",
"lint": "eslint -f unix --ext .js,.jsx src/ ",
"lint:css": "stylelint '**/*.scss'",
"build": "webpack --mode production",
Expand Down Expand Up @@ -70,7 +70,7 @@
"postcss-loader": "^7.3.3",
"postcss-scss": "^2.0.0",
"redux": "^4.0.5",
"rimraf": "^3.0.2",
"rimraf": "^5.0.5",
"style-loader": "^3.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:unit": "mocha",
"test:e2e": "rimraf './test/e2e/mismatch/*.png' './test/e2e/mismatch/report-*.html' && mocha --config ./test/.e2e.mocharc.js",
"start": "webpack-dev-server --mode development --open",
"clean": "rimraf 'build/*' 'coverage/*'",
"clean": "rimraf build coverage",
"build": "run-s 'build:*'",
"build:js": "webpack --mode production",
"build:css": "run-s 'build:css:*'",
Expand Down Expand Up @@ -114,7 +114,7 @@
"jquery.terminal": "^2.1.0",
"jsdoc": "^3.6.3",
"mini-css-extract-plugin": "^2.7.6",
"mkdirp": "^1.0.3",
"mkdirp": "^3.0.1",
"mocha": "^10.3.0",
"ncp": "^2.0.0",
"node-resemble-js": "^0.2.0",
Expand All @@ -132,7 +132,7 @@
"proxyquire": "^2.1.3",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"rimraf": "^3.0.2",
"rimraf": "^5.0.5",
"selenium-webdriver": "^4.0.0-alpha.7",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0",
Expand Down
Loading
Loading