From 3b79ba9799a7da39cc6ad53bb957b6a1ae70d501 Mon Sep 17 00:00:00 2001 From: siavol Date: Mon, 7 Oct 2024 23:57:22 +0300 Subject: [PATCH] configure coverage and codecov (#78) --- .github/workflows/main.yml | 13 ++++++++++++- package.json | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a96b3ec..308682d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,18 @@ jobs: run: npm run lint - name: Run tests - run: npm test + run: npm run test:coverage + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: ./coverage + + - name: Upload results to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Build app env: diff --git a/package.json b/package.json index ead3f2e..9664b50 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "build:check-envs": "node ./check-env-vars", "build:app": "react-scripts build", "test": "react-scripts test", + "test:coverage": "react-scripts test --coverage", "eject": "react-scripts eject", "lint": "eslint ." },