Add symfony 7.0 to GitHub workflow #284
Workflow file for this run
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: PHP | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
run: | |
runs-on: ${{ matrix.operating-system }} | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: --entrypoint redis-server | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.0', '8.1', '8.2', '8.3'] | |
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# pulls all commits (needed for lerna / semantic release to correctly version) | |
fetch-depth: "0" | |
# pulls all tags (needed for lerna / semantic release to correctly version) | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl, redis, apcu | |
ini-values: post_max_size=256M, apc.enabled=on, apc.enable_cli=on | |
coverage: xdebug | |
tools: php-cs-fixer, phpunit | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
# Use composer.json for key, if composer.lock is not committed. | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run PHPUnit Tests | |
run: vendor/bin/phpunit --coverage-text --coverage-clover coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |