Skip to content

Commit 300f27c

Browse files
Rodion LiuboretsLuborRod
authored andcommitted
SDK-1829:modify_sonar_cloud
1 parent 900d0dd commit 300f27c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/sonar.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Sonar Scan
2-
on: [push, pull_request_target]
2+
on: [ push, pull_request_target ]
33

44
jobs:
55
sonar:
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v2
1616
with:
1717
fetch-depth: 0
18-
18+
1919
- uses: shivammathur/[email protected]
2020
with:
2121
php-version: 8.0
@@ -24,8 +24,10 @@ jobs:
2424
- run: composer coverage-clover
2525
- run: composer coverage-html
2626

27+
- name: Fix code coverage paths
28+
run: sed -i 's/\/home\/runner\/work\/yoti-php-sdk\/yoti-php-sdk\//\/github\/workspace\//g' ./coverage/coverage.xml
29+
2730
- uses: sonarsource/sonarcloud-github-action@master
2831
env:
2932
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3033
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
31-

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ sonar.language = php
99
sonar.sources=src
1010
sonar.tests=tests
1111
sonar.exclusions=src/Protobuf/**/*
12-
; sonar.php.coverage.reportPaths=coverage/coverage.xml
12+
sonar.php.coverage.reportPaths=coverage/coverage.xml
1313
sonar.verbose = true

0 commit comments

Comments
 (0)