forked from XOOPS/RegDom
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.23 KB
/
sonarcloud.yml
File metadata and controls
44 lines (37 loc) · 1.23 KB
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
name: SonarCloud
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
if: github.repository == 'XOOPS/RegDom'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: "8.3"
extensions: intl, mbstring
tools: composer
coverage: xdebug
- name: Install dependencies
env:
XOOPS_SKIP_PSL_UPDATE: 1
run: composer update --prefer-stable --no-interaction --prefer-dist --no-progress
- name: Ensure build directory exists
run: mkdir -p build/logs
- name: Run tests with coverage
run: ./vendor/bin/phpunit --colors=always --coverage-clover build/logs/clover.xml
- name: SonarCloud Scan
if: env.SONAR_TOKEN != ''
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}