-
Notifications
You must be signed in to change notification settings - Fork 9
33 lines (26 loc) · 855 Bytes
/
Copy pathSonar.yml
File metadata and controls
33 lines (26 loc) · 855 Bytes
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
name: Sonar
on: push
jobs:
Code-Quality:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0
- name: Install pcov
run: sudo apt install php-pcov
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run tests
run: vendor/bin/phpunit --log-junit results.xml --coverage-clover coverage.xml
env:
XDEBUG_MODE: coverage
- name: Prepare files
run: sed -i 's#'`pwd`'/##' results.xml coverage.xml
- name: Sonar analysis
uses: SonarSource/sonarqube-scan-action@v7.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}