-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add CodeCov reporting back after a 3 year hiatus #1788
Changes from all commits
74522f2
61e5526
7aee09b
300c289
03c7cd0
29e47ec
cf4ef00
458dc5d
e9903d9
02f37d8
a9c4a16
76f59ef
f96b50a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,14 @@ jobs: | |
matrix: | ||
node-version: [18.x, 20.x] | ||
package: | ||
- packages/cli-hooks | ||
- packages/logger | ||
- packages/oauth | ||
- packages/rtm-api | ||
- packages/socket-mode | ||
- packages/types | ||
- packages/web-api | ||
- packages/webhook | ||
- cli-hooks | ||
- logger | ||
- oauth | ||
- rtm-api | ||
- socket-mode | ||
- types | ||
- web-api | ||
- webhook | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
|
@@ -32,15 +32,28 @@ jobs: | |
- name: Get Development Dependencies | ||
run: npm i | ||
- name: Build and Run Tests in Each Package | ||
working-directory: ${{ matrix.package }} | ||
working-directory: packages/${{ matrix.package }} | ||
run: | | ||
npm install || npm list | ||
# depending on which package we are testing, also npm link up other dependent packages | ||
case "$PWD" in | ||
*/webhook) pushd ../types && npm i && popd && npm link ../types;; | ||
*/web-api) pushd ../types && npm i && popd && npm link ../types && pushd ../logger && npm i && popd && npm link ../logger;; | ||
*/oauth) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;; | ||
# TODO: add socket-mode here once new major version released | ||
*/socket-mode) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;; | ||
*) ;; # default | ||
esac | ||
npm test | ||
- name: Check for coverage report existence | ||
id: check_coverage | ||
uses: andstor/file-existence-action@v3 | ||
with: | ||
files: packages/${{ matrix.package }}/coverage/lcov.info | ||
- name: Upload code coverage | ||
if: matrix.node-version == '20.x' && steps.check_coverage.outputs.files_exists == 'true' | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: packages/${{ matrix.package }}/coverage | ||
flags: ${{ matrix.package }} | ||
verbose: true | ||
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
comment: | ||
layout: "condensed_header, diff, flags" | ||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
|
||
flags: | ||
cli-hooks: | ||
paths: | ||
- packages/cli-hooks/** | ||
carryforward: true | ||
logger: | ||
paths: | ||
- packages/logger/** | ||
carryforward: true | ||
oauth: | ||
paths: | ||
- packages/oauth/** | ||
carryforward: true | ||
socket-mode: | ||
paths: | ||
- packages/socket-mode/** | ||
carryforward: true | ||
web-api: | ||
paths: | ||
- packages/web-api/** | ||
carryforward: true | ||
webhook: | ||
paths: | ||
- packages/webhook/** | ||
carryforward: true |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Farewell, |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ | |
"eslint-plugin-node": "^11.1.0", | ||
"mocha": "^10.2.0", | ||
"shx": "^0.3.4", | ||
"sinon": "^17.0.1" | ||
"sinon": "^17.0.1", | ||
"typescript": "5.4.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🙌 thanks! |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.ts"], | ||
"exclude": ["**/*.spec.js"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ | |
/dist | ||
|
||
# coverage | ||
/.nyc_output | ||
/coverage |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.ts"], | ||
"exclude": ["**/*.spec.js", "**/*.spec.ts"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,5 @@ package-lock.json | |
/dist | ||
|
||
# coverage | ||
/.nyc_output | ||
/coverage | ||
*.lcov | ||
tmp/ | ||
tmp/ |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.ts"], | ||
"exclude": ["**/*.spec.ts"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.ts"], | ||
"exclude": ["**/*.spec.js"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.ts"], | ||
"exclude": ["**/*.spec.js"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠💡