Skip to content

Commit c281939

Browse files
committed
Adding secondary job for sonarqube
1 parent 05af9d8 commit c281939

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- develop
1010
- master
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build:
1418
name: Build
@@ -44,6 +48,13 @@ jobs:
4448
vendor/bin/phpcs --ignore=functions.php --standard=PSR2 src/
4549
vendor/bin/phpunit -c phpunit.xml.dist -v --testsuite integration
4650
51+
sonarqube:
52+
name: Sonarqube
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v2
57+
4758
- name: SonarQube Scan (Push)
4859
if: github.event_name == 'push'
4960
uses: SonarSource/sonarcloud-github-action@v1.5
@@ -55,7 +66,7 @@ jobs:
5566
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
5667
-Dsonar.projectName=${{ github.event.repository.name }}
5768
-Dsonar.projectKey=${{ github.event.repository.name }}
58-
-Dsonar.sources='./src'
69+
-Dsonar.sources="${{ github.workspace }}/src"
5970
-Dsonar.exclusions='**/tests/**/*.*'
6071
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
6172
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
@@ -71,7 +82,7 @@ jobs:
7182
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
7283
-Dsonar.projectName=${{ github.event.repository.name }}
7384
-Dsonar.projectKey=${{ github.event.repository.name }}
74-
-Dsonar.sources='./src'
85+
-Dsonar.sources="${{ github.workspace }}/src"
7586
-Dsonar.exclusions='**/tests/**/*.*'
7687
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
7788
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"

0 commit comments

Comments
 (0)