-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.13 KB
/
sonar-project.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: SonarQube Analysis
on:
push:
branches:
- DE-55463-SonarQubeIntegration
pull_request:
workflow_dispatch:
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.1
steps:
- name: Display Environment information
run: |
php --version
composer --version
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, sockets
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHPUnit tests and Generate coverage report
run: vendor/bin/phpunit --coverage-clover=coverage.xml --testdox --verbose
sonarqube:
runs-on: ubuntu-latest
needs: phpunit
steps:
- name: Checkout
uses: actions/checkout@v2
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://sonar.nice.com"