Use sonarcloud #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: ~ | |
pull_request: ~ | |
jobs: | |
phpunit: | |
name: PHPUnit on ${{ matrix.php }} and symfony ${{ matrix.symfony }} (${{ matrix.deps_strategy }} dependencies) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
deps_strategy: [ '', '--prefer-lowest' ] | |
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] | |
steps: | |
- name: Update code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update ${{ matrix.deps_strategy }} | |
- name: Tests | |
run: vendor/bin/phpunit --colors=always --coverage-clover=coverage.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |