diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ae24c197..5d8a6213 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -57,7 +57,7 @@ jobs: run: gotestsum --junitfile unit-tests.xml $(go list ./... | grep -v testintegration) -coverpkg=./... -coverprofile=coverage_unit.out - uses: actions/upload-artifact@v3 with: - name: coverage_unit + name: coverage path: coverage_unit.out - name: Test Report uses: dorny/test-reporter@v1 @@ -94,7 +94,7 @@ jobs: reporter: java-junit # Format of test results - uses: actions/upload-artifact@v3 with: - name: coverage_int + name: coverage path: coverage_int.out - name: Stop containers run: docker stop badaas-test-db @@ -139,16 +139,10 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Download unit tests line coverage report + - name: Download line coverage reports uses: actions/download-artifact@v3 with: - name: coverage_unit - path: coverage_unit.out - - name: Download int tests line coverage report - uses: actions/download-artifact@v3 - with: - name: coverage_int - path: coverage_int.out + name: coverage - name: SonarCloud Scan uses: sonarsource/sonarcloud-github-action@master env: diff --git a/sonar-project.properties b/sonar-project.properties index b6014bb3..aac1e397 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,4 +6,4 @@ sonar.sources=. sonar.exclusions=**/*_test.go,mocks/***,vendor/*** sonar.tests=. sonar.test.inclusions=**/*_test.go,testintegration/***,test_e2e/*** -sonar.go.coverage.reportPaths=coverage_unit.out/coverage_unit.out,coverage_int.out/coverage_int.out +sonar.go.coverage.reportPaths=*.out