From 26720cfd6dcf1305c2ec2befd070ecf92dce5bbe Mon Sep 17 00:00:00 2001 From: Marc Jorge Date: Thu, 12 Sep 2024 14:33:18 +0200 Subject: [PATCH] fix: github - codecov workflow set node v20 + use correct coverage file --- .github/workflows/codecov.yml | 8 ++++++-- package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index cfedfe2..ea6c532 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,14 +15,18 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 + with: + node-version: 20 - name: Install dependencies - run: npm install + run: yarn install - name: Run tests - run: npx jest --coverage + run: yarn test:cov - name: Upload results to Codecov uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/coverage-final.json + verbose: true diff --git a/package.json b/package.json index c3bf706..c7ef92c 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "prepublish": "yarn run build", "prepack": "yarn run build", "test": "jest", + "test:cov": "jest --coverage", "all": "yarn format && yarn lint && yarn test && yarn prepack" }, "dependencies": { @@ -74,7 +75,6 @@ "collectCoverageFrom": [ "**/*.service.ts" ], - "coverageDirectory": "../coverage", "testEnvironment": "node" } }