Start tracking coverage (#351)

* Start tracking coverage

* coverage test
This commit is contained in:
Will Hunt 2022-09-01 16:01:08 +01:00 committed by GitHub
parent 33becc47ee
commit 311ac9f168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 602 additions and 11 deletions

View File

@ -19,6 +19,7 @@ jobs:
node-version: 16
- run: yarn --ignore-scripts
- run: yarn lint:js
lint-rust:
runs-on: ubuntu-latest
steps:
@ -29,6 +30,7 @@ jobs:
profile: minimal
components: rustfmt
- run: cargo fmt --all -- --check
config:
runs-on: ubuntu-latest
steps:
@ -67,4 +69,4 @@ jobs:
toolchain: stable
profile: minimal
- run: yarn
- run: yarn test
- run: yarn test:cover

View File

@ -3,7 +3,6 @@ name: Newsfile
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
changelog:

8
.gitignore vendored
View File

@ -1,4 +1,3 @@
*.pem
config.yml
lib/
node_modules/
@ -15,3 +14,10 @@ public/
/src/libRs.d.ts
book
*.cer
*.pem
*.pcks8
# Coverage
coverage
.nyc_output

1
changelog.d/351.misc Normal file
View File

@ -0,0 +1 @@
Track coverage of tests.

View File

@ -32,6 +32,7 @@
"start:webhooks": "node --require source-map-support/register lib/App/GithubWebhookApp.js",
"start:matrixsender": "node --require source-map-support/register lib/App/MatrixSenderApp.js",
"test": "mocha -r ts-node/register tests/init.ts tests/*.ts tests/**/*.ts",
"test:cover": "nyc --reporter=lcov --reporter=text yarn test",
"lint": "yarn run lint:js && yarn run lint:rs",
"lint:js": "eslint -c .eslintrc.js 'src/**/*.ts' 'tests/**/*.ts' 'web/**/*.ts' 'web/**/*.tsx'",
"lint:rs": "cargo fmt --all -- --check",
@ -59,6 +60,7 @@
"micromatch": "^4.0.4",
"mime": "^3.0.0",
"node-emoji": "^1.11.0",
"nyc": "^15.1.0",
"prom-client": "^14.0.1",
"reflect-metadata": "^0.1.13",
"rss-parser": "^3.12.0",

597
yarn.lock

File diff suppressed because it is too large Load Diff