From cb44ebda5bed2451496639a4901bf25748fe898c Mon Sep 17 00:00:00 2001 From: David Mehren Date: Wed, 6 Jan 2021 12:38:33 +0100 Subject: [PATCH] Add coverage analysis to CI workflow Signed-off-by: David Mehren --- .github/workflows/nest.js.yml | 12 ++++++++++-- package.json | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nest.js.yml b/.github/workflows/nest.js.yml index 4cdf8a655..131eded3a 100644 --- a/.github/workflows/nest.js.yml +++ b/.github/workflows/nest.js.yml @@ -80,7 +80,11 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - 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: runs-on: ubuntu-latest @@ -101,4 +105,8 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - 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 diff --git a/package.json b/package.json index 714902406..492b01f36 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "test:watch": "jest --watch", "test:cov": "jest --coverage", "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": { "@nestjs/common": "7.4.4",