Skip to content

Commit

Permalink
ci: fix sonar conf for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDmz committed Dec 8, 2023
1 parent 4e5b405 commit a93a2c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
run: yarn --frozen-lockfile
- name: test & coverage
run: yarn run test
- name: fix code coverage paths
working-directory: ./coverage
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' lcov.info
- name: SonarCloud scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sonor",
"version": "0.5.21",
"version": "0.5.22",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ sonar.projectKey=InseeFr_Sonor
sonar.organization=inseefr

# exclude tests files for code duplication evaluation
sonar.sources = src/
sonar.exclusions = src/tests/**/*,src/components/**/__snapshots__/*
sonar.sources = src
sonar.exclusions = src/tests/**, src/components/**/__snapshots__/* , //src/tests/**
sonar.javascript.lcov.reportPaths = coverage/lcov.info

0 comments on commit a93a2c1

Please sign in to comment.