Skip to content

Commit

Permalink
Add codecov coverage uploading.
Browse files Browse the repository at this point in the history
  • Loading branch information
filmaj committed May 8, 2024
1 parent 45b6b51 commit e27f8a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: npm ci && npm run build
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run test:gen-cov
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v4
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}

integration_test_botToken:
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"scripts": {
"lint": "eslint .",
"local": "act public --eventpath .github/workflows/local/event.json --secret-file .github/workflows/local/.env --platform ubuntu-latest=node:20-buster",
"test:mocha": "nyc mocha --config .mocharc.json test/*-test.js",
"test": "npm run lint && npm run test:mocha",
"test:mocha": "mocha --config .mocharc.json test/*-test.js",
"test:gen-cov": "nyc --reporter=lcov npm run test:mocha",
"test": "npm run lint && nyc npm run test:mocha",
"build": "npx @vercel/ncc build src/index.js --license licenses.txt"
},
"repository": {
Expand Down

0 comments on commit e27f8a9

Please sign in to comment.