Skip to content

Commit

Permalink
ci: fix only affected coverage reported to sonarcloud (fixes #282)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg committed Jan 28, 2024
1 parent 23cc4f1 commit 49ffa5f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ jobs:
- name: Lint
run: npx nx affected --target=lint --parallel=3

- name: Run Tests with Code Coverage
run: npx nx affected --target=test --parallel=3 --ci --coverage --coverageReporters=lcov
- name: Run all tests
if: github.event_name == 'push'
run: npx nx run-many --all --target=test --parallel --ci --coverage --coverageReporters=lcov
- name: Run affected tests
if: github.event_name == 'pull_request'
run: npx nx affected --target=test --parallel --ci --coverage --coverageReporters=lcov
- name: Merge Coverage files
run: '[ -d "./coverage/" ] && ./node_modules/.bin/lcov-result-merger ./coverage/**/lcov.info ./coverage/lcov.info || exit 0'

Expand Down

0 comments on commit 49ffa5f

Please sign in to comment.