Skip to content

Improve CI

Improve CI #2

Workflow file for this run

name: SonarCloud analysis
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
pull-requests: read
jobs:
sonar:
name: Analyze with SonarCloud
runs-on: ubuntu-latest
steps:
- name: Update code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: xdebug
tools: composer:v2
- name: Install dependencies
run: composer install
- name: Tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}