From d6b3a4c2f1703625e775bd9e942b0e890aa7eb06 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Wed, 16 Apr 2025 10:51:09 +0200 Subject: [PATCH] chore: add coveralls --- .github/workflows/code_health.yaml | 7 +++++++ .gitignore | 1 + jest.config.js | 1 + package.json | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 5a99be15..91e7dfb1 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -44,3 +44,10 @@ jobs: run: npm ci - name: Run tests run: npm test + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v2.3.6 + if: matrix.os == 'ubuntu-latest' + with: + file: coverage/lcov.info + git-branch: ${{ github.head_ref || github.ref_name }} + git-commit: ${{ github.event.pull_request.head.sha || github.sha }} diff --git a/.gitignore b/.gitignore index ec17480c..4e3f7a54 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ node_modules state.json tests/tmp +coverage diff --git a/jest.config.js b/jest.config.js index 59baa966..0ffe94af 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,4 +17,5 @@ export default { }, moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], setupFilesAfterEnv: ["jest-extended/all"], + coveragePathIgnorePatterns: ["node_modules", "tests", "dist"], }; diff --git a/package.json b/package.json index a4f6f264..b2ca5adc 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "check:format": "prettier -c .", "reformat": "prettier --write .", "generate": "./scripts/generate.sh", - "test": "jest" + "test": "jest --coverage" }, "license": "Apache-2.0", "devDependencies": {