test: collect and publish code coverage

This commit is contained in:
Jonas Gloning 2023-01-07 19:31:38 +01:00
parent 5e3dedcd72
commit e1fd4dc476
No known key found for this signature in database
GPG Key ID: 684639B5E59E7614
4 changed files with 2379 additions and 4 deletions

View File

@ -27,5 +27,10 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run build
- run: npm run lint
- run: npm run coverage
- name: Publish code coverage to CodeClimate
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}

4
.gitignore vendored
View File

@ -1,4 +1,4 @@
lib-cov
.nyc_output
*.seed
*.log
*.csv
@ -17,4 +17,4 @@ npm-debug.log
.idea
.cache
.vscode
.vscode

2368
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -34,6 +34,7 @@
"tsc": "tsc",
"prebuild": "npm run lint",
"test": "npm run lint && mocha -r ts-node/register \"test/**/*\"",
"coverage": "nyc mocha -r ts-node/register \"test/**/*\"",
"start": "bin/peerjs --port ${PORT:=9000}",
"dev:start": "npm-run-all build start",
"dev": "nodemon --watch src -e ts --exec npm run dev:start",
@ -62,6 +63,7 @@
"mock-socket": "8.0.5",
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"semantic-release": "^19.0.5",
"sinon": "^7.5.0",