Skip to content

Commit 80d7716

Browse files
authored
CI: fix sonar (#462)
1 parent d56f538 commit 80d7716

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Get Composer Cache Directory
5454
id: composer-cache
55-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
55+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
5656

5757
- name: Cache dependencies
5858
uses: actions/cache@v3
@@ -99,6 +99,8 @@ jobs:
9999
steps:
100100
- name: Checkout
101101
uses: actions/checkout@v3
102+
with:
103+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
102104

103105
- name: Setup cache environment
104106
id: extcache
@@ -125,7 +127,7 @@ jobs:
125127

126128
- name: Get Composer Cache Directory
127129
id: composer-cache
128-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
130+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
129131

130132
- name: Cache dependencies
131133
uses: actions/cache@v3
@@ -151,10 +153,10 @@ jobs:
151153
- name: Change paths in clover.xml
152154
run: |
153155
sed -i 's+/home/runner/work/bundle-stripe/bundle-stripe+/github/workspace+g' ./var/coverage/clover.xml
156+
mv ./var/coverage/clover.xml coverage.xml
154157
155158
- name: SonarCloud Scan
156159
uses: sonarsource/[email protected]
157-
continue-on-error: true
158160
env:
159161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160162
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.projectKey=SMillerDev_phpdraft
2+
sonar.organization=smillerdev
23
sonar.projectName=PHPDraft
3-
sonar.organization=smillerdev-github
44
sonar.sources=src/PHPDraft
55
sonar.php.coverage.reportPaths=coverage.xml
66
sonar.exclusions=src/PHPDraft/**/Tests/**, tests/**

0 commit comments

Comments
 (0)