Skip to content

Commit

Permalink
Create workflow that sends coverage report to Codacy.
Browse files Browse the repository at this point in the history
  • Loading branch information
LamboCreeper committed Jul 5, 2020
1 parent 92e08d1 commit 2178ad6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: coverage
on:
push:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Send Coverage Report To Codacy
run: |
npm i
npm run coverage
CODACY_PROJECT_TOKEN=${{ secrets.CODACY_SECRET }} bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage/lcov.info
8 changes: 8 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"check-coverage": true,
"include": [
"src/"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "node -r dotenv/config ./build/app.js",
"build": "tsc",
"coverge": "nyc --reporter=lcov --reporter=text-summary npm test",
"coverage": "nyc --reporter=lcov --reporter=text-summary npm test",
"test": "ts-mocha test/**/*Test.ts test/**/**/*Test.ts --exit",
"lint": "eslint src --ext .js,.ts"
},
Expand Down

0 comments on commit 2178ad6

Please sign in to comment.