From e17a8d38b0ff560da7f08a1149e0fc796d1562cd Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Thu, 29 May 2025 08:37:16 -0600 Subject: [PATCH] Fix uploading coverage to coveralls Signed-off-by: Matthew Peveler --- .github/workflows/ci.yml | 10 ++++++---- .gitignore | 1 + package.json | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51195f9..27a4527 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,10 @@ jobs: - name: Run tests run: npm test - - name: Upload to coveralls - run: | - npm install coveralls - npm run coveralls + - name: Generate coverage report + run: npm run coverage + - name: Upload to coveralls + uses: coverallsapp/github-action@v2 + with: + file: ./coverage.lcov diff --git a/.gitignore b/.gitignore index ecccf38..db0fc6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /node_modules/ /coverage/ /.nyc_output/ +/coverage.lcov diff --git a/package.json b/package.json index 4a2bcc6..c855acc 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "test": "nyc mocha tests/node-test.js", "report": "nyc --reporter=html --reporter=text mocha tests/node-test.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", + "coverage": "nyc report --reporter=text-lcov > coverage.lcov", "build": "uglifyjs src/sha256.js -c -m eval --comments -o build/sha256.min.js" }, "repository": {