From ceec3af31185c6c3a18022ec1192064f7a6a4335 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Thu, 7 May 2026 20:27:51 -0700 Subject: [PATCH] chore(ci): fix sonarcloud relative path issue --- .coveragerc | 2 ++ .github/workflows/master.yml | 8 ++------ .github/workflows/sonar.yml | 6 +----- 3 files changed, 5 insertions(+), 11 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..ce2f455 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +relative_files = True \ No newline at end of file diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a54922b..e8aae99 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -27,20 +27,16 @@ jobs: run: | pip install pipenv pipenv install --dev - + - name: Test run: pipenv run pytest -v --cov=./ --cov-report xml - - name: Fix code coverage path - working-directory: ./ - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml - - name: SonarCloud Scan uses: sonarsource/sonarqube-scan-action@v8.0.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} if: env.SONAR_TOKEN != '' - + docker: name: Publish Docker Image needs: [ build-test ] diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 99e3014..393ad72 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -42,14 +42,10 @@ jobs: run: | pip install pipenv pipenv install --dev - + - name: Test run: pipenv run pytest -v --cov=./ --cov-report xml - - name: Fix code coverage path - working-directory: ./ - run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml - - name: SonarCloud Scan uses: sonarsource/sonarqube-scan-action@v8.0.0 env: