Add coverage analysis to CI workflow

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-06 12:38:33 +01:00
parent f0835f5b62
commit cb44ebda5b
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 12 additions and 3 deletions

View file

@ -80,7 +80,11 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run test - run: yarn run test:cov
- uses: codecov/codecov-action@v1
with:
directory: coverage
flags: integration-tests
e2e-tests: e2e-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -101,4 +105,8 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile --prefer-offline - run: yarn --frozen-lockfile --prefer-offline
- run: yarn run test:e2e - run: yarn run test:e2e:cov
- uses: codecov/codecov-action@v1
with:
directory: coverage-e2e
flags: e2e-tests

View file

@ -20,7 +20,8 @@
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:cov": "jest --coverage", "test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config jest-e2e.json" "test:e2e": "jest --config jest-e2e.json",
"test:e2e:cov": "jest --config jest-e2e.json --coverage"
}, },
"dependencies": { "dependencies": {
"@nestjs/common": "7.4.4", "@nestjs/common": "7.4.4",