Skip to content
Closed

merge #60716

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build
on:
push:
branches:
- 12.x
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarqube:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: xdebug
tools: composer

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: |
composer install --no-interaction --prefer-dist

- name: Run PHPUnit with coverage
env:
XDEBUG_MODE: coverage
run: |
mkdir -p build/logs
php -d memory_limit=1G ./vendor/bin/phpunit \
--configuration phpunit.xml.dist \
--coverage-clover build/logs/clover.xml \
--coverage-filter src \
--do-not-fail-on-warning

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8 changes: 8 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sonar.projectKey=AntoineCvlz_laravel-framework
sonar.organization=antoinecvlz

sonar.sources=src
sonar.tests=tests
sonar.php.coverage.reportPaths=build/logs/clover.xml

sonar.exclusions=vendor/**,**/node_modules/**,storage/**,build/**,.github/**
Loading