Skip to content

Commit

Permalink
ensuring LCOV coverage file exists to verify thet solution
Browse files Browse the repository at this point in the history
  • Loading branch information
akaiap committed Feb 5, 2025
1 parent 1eed67b commit e19bfe7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,20 @@ jobs:
- name: Run Build
run: npm run build --if-present

# Run Tests
- name: Run Tests
run: npm test
# Run Tests and Generate Coverage Report
- name: Run Tests with Coverage
run: npm run coverage

# Debug: Verify that LCOV coverage file exists
- name: Check Coverage File
run: |
echo "Checking if LCOV file exists..."
ls -lh ./coverage/
cat ./coverage/lcov.info | head -n 20
# Upload coverage to Coveralls
- name: Upload Coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@
"test": "mocha --reporter list --require @babel/register",
"start-dev": "parallelshell --wait \"nodemon web-client/app.js\" \"nodemon server/app.js\" \"webpack --watch --mode=development\"",
"start-prod": "parallelshell --wait \"nodemon web-client/app.js\" \"nodemon server/app.js\" \"webpack --watch --mode=production\"",
"coverage": "nyc mocha --reporter list --require @babel/register",
"coverage": "nyc --reporter=lcov mocha --require @babel/register",
"lint": "eslint \"**/*.js\"",
"coveralls": "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN nyc report --reporter=text-lcov | coveralls"
"coveralls": "npm run coverage && nyc report --reporter=lcov | coveralls"

},
"repository": {
"type": "git",
Expand Down

0 comments on commit e19bfe7

Please sign in to comment.