diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 20599e6..cddf051 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -38,7 +38,12 @@ jobs: - name: Download Coverage uses: actions/download-artifact@v4 with: - name: coverage.xml + path: . + pattern: coverage + + - name: Check Coverage + id: coverage + run: test -e coverage/coverage.xml && echo "file=true" >> $GITHUB_OUTPUT || echo "file=false" >> $GITHUB_OUTPUT - name: Select Project env: @@ -54,4 +59,4 @@ jobs: args: > -Dsonar.projectKey=${{ env.GITHUB_PROJECT }} -Dsonar.organization=${{ github.repository_owner }} - -Dsonar.coverageReportPaths=coverage.xml + ${{steps.coverage.outputs.file == 'true' && '-Dsonar.coverageReportPaths=coverage/coverage.xml' || ''}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba70968..8c4ad83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,8 +84,8 @@ jobs: - name: Download Build uses: actions/download-artifact@v4 with: - name: build - path: dist + path: . + pattern: dist - name: Setup Service run: NODE_ENV=test npm run setup --if-present @@ -101,5 +101,5 @@ jobs: - name: Upload Coverage uses: actions/upload-artifact@v4 with: - name: coverage.xml + name: coverage path: coverage.xml diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index 8f33c4b..a9bf433 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -36,5 +36,5 @@ jobs: - name: Upload Build uses: actions/upload-artifact@v4 with: - name: build + name: dist path: dist