diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9362be2..c914508 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} \ No newline at end of file + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index 3c935f5..1d8f3bf 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -24,7 +24,7 @@ module.exports = (config) => { 'progress' ], coverageReporter: { - type: 'lcov', + type: 'html', dir: 'coverage/' }, browsers: [ 'PhantomJS' ], @@ -45,5 +45,10 @@ module.exports = (config) => { } }; + if (process.env.CI) { + opts.coverageReporter.type = 'lcov'; + opts.reporters.push('coveralls'); + } + config.set(opts); };