Skip to content

fix: do not use removed parameter kernel.root_dir #64

fix: do not use removed parameter kernel.root_dir

fix: do not use removed parameter kernel.root_dir #64

Workflow file for this run

name: Tests
on:
push:
pull_request_target:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php_version:
- '8.1'
- '8.2'
- '8.3'
name: PHP ${{ matrix.php_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with pecl extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
extensions: :psr
- run: composer install
- run: vendor/bin/phpunit --coverage-clover phpunit/phpunit.coverage.xml --log-junit phpunit/junit.xml
- name: Set repository name
id: repository-name
run: |
echo "REPOSITORY_NAME=$(echo $GITHUB_REPOSITORY | tr '/' '_')" >> $GITHUB_OUTPUT
echo "REPOSITORY_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)" >> $GITHUB_OUTPUT
- name: fix code coverage paths
working-directory: ./phpunit
run: |
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.coverage.xml
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' junit.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args:
-Dsonar.projectKey=${{ steps.repository-name.outputs.REPOSITORY_NAME }}
-Dsonar.organization=${{ steps.repository-name.outputs.REPOSITORY_OWNER }}
-Dsonar.sources=src
-Dsonar.tests=tests
-Dsonar.php.coverage.reportPaths=phpunit/phpunit.coverage.xml
-Dsonar.php.tests.reportPath=phpunit/junit.xml