Skip to content

Commit

Permalink
ci: integrate codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Ende committed Oct 21, 2020
1 parent 2140fe6 commit 4280a1d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,25 @@ jobs:
run: npm run lint

- name: Test
run: npm test -- --code-coverage=true
run: npm test -- --codeCoverage --coverageReporters=json --coverageReporters=text --coverageReporters=text-summary

- name: Test coverage unit tests
uses: codecov/[email protected]
with:
name: ng-mockito (unit tests)
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/libs/ng-mockito/ng-mockito/coverage-final.json
# Specify whether or not CI build should fail if Codecov runs into an error during upload
fail_ci_if_error: false

- name: Test coverage integration tests
uses: codecov/[email protected]
with:
name: ng-mockito (integration tests)
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/libs/ng-mockito/integration/coverage-final.json
# Specify whether or not CI build should fail if Codecov runs into an error during upload
fail_ci_if_error: false

- name: Build
run: npm run build
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
precision: 2
round: down
range: '90...100'

0 comments on commit 4280a1d

Please sign in to comment.