deps: Support symfony ^7.0 versions #13
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: PHPUnit Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
phpunit: | |
name: PHPUnit | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
# Checkout the code | |
- name: Checkout Code | |
uses: actions/[email protected] | |
# Setup PHP | |
- name: Setup PHP | |
uses: shivammathur/[email protected] | |
with: | |
php-version: '8.2' | |
coverage: xdebug | |
# Install dependencies | |
- name: Cache Composer dependencies | |
uses: actions/[email protected] | |
with: | |
path: vendor | |
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }} | |
- name: Install dependencies | |
run: | | |
composer install --prefer-dist --no-scripts --ignore-platform-reqs | |
# Run tests | |
- name: Run Unit Tests | |
run: | | |
vendor/bin/phpunit --coverage-text --coverage-clover reports/coverage.xml | |
# SonarCloud | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |