Skip to content

Commit

Permalink
Fix coveralls - use karma reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
zewish committed Feb 18, 2021
1 parent c577676 commit 8848dc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ jobs:
node-version: 14.x
check-latest: true
- run: npm install
- run: ls -lah coverage/*
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
7 changes: 6 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = (config) => {
'progress'
],
coverageReporter: {
type: 'lcov',
type: 'html',
dir: 'coverage/'
},
browsers: [ 'PhantomJS' ],
Expand All @@ -45,5 +45,10 @@ module.exports = (config) => {
}
};

if (process.env.CI) {
opts.coverageReporter.type = 'lcov';
opts.reporters.push('coveralls');
}

config.set(opts);
};

0 comments on commit 8848dc7

Please sign in to comment.