Skip to content

Commit

Permalink
chore: ci coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bachilli committed Nov 3, 2023
1 parent d792929 commit ed5a8df
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:

- run: composer ci:coverage

- name: Fix PHPUnit code paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace@g' phpunit-reports/phpunit.coverage.xml

- name: Store test results and coverage report
uses: actions/upload-artifact@v3
if: always()
Expand All @@ -53,15 +56,8 @@ jobs:

- uses: actions/download-artifact@v3

- name: Get PHP coverage report paths
id: coverage
run: echo "reportPaths=$(find "$PWD/phpunit-reports" -type f | xargs echo | sed 's@'$GITHUB_WORKSPACE'@/github/workspace@g' | sed 's/ /,/g')" >> $GITHUB_OUTPUT

- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.php.coverage.reportPaths=${{ steps.coverage.outputs.reportPaths }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit ed5a8df

Please sign in to comment.