v4 features #471
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: Analysis | |
'on': | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- README.md | |
pull_request: | |
paths-ignore: | |
- README.md | |
jobs: | |
analysis: | |
name: 'PHP ${{ matrix.php }} Symfony ${{ matrix.symfony }}' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- 8.2 | |
- 8.3 | |
symfony: | |
- '6.2.*' | |
- '6.4.*' | |
env: | |
APP_ENV: test | |
steps: | |
- | |
uses: actions/checkout@v3 | |
- | |
name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php }}' | |
tools: symfony | |
coverage: none | |
- | |
name: 'Composer - Get Cache Directory' | |
id: composer-cache | |
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT' | |
- | |
name: 'Composer - Set cache' | |
uses: actions/cache@v3 | |
with: | |
path: '${{ steps.composer-cache.outputs.dir }}' | |
key: 'php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}' | |
restore-keys: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-\n" | |
- | |
name: 'Composer - Validate composer.json and composer.lock' | |
run: 'composer validate --strict' | |
- | |
name: 'Composer - Github Auth' | |
run: 'composer config -g github-oauth.github.com ${{ github.token }}' | |
- | |
name: 'Composer - Restrict Symfony version' | |
run: 'composer config extra.symfony.require "${{ matrix.symfony }}"' | |
- | |
name: 'Composer - Update dependencies' | |
run: 'composer update --no-progress' | |
id: end-of-setup | |
- | |
name: 'ECS - Run' | |
run: 'if [ -f ruleset/ecs.php ]; then vendor/bin/ecs check src/ --no-progress-bar -c ruleset/ecs.php ; else echo Ecs ruleset file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
name: 'PHPStan - Run' | |
run: 'if [ -f ruleset/phpstan.neon ]; then vendor/bin/phpstan analyse -c ruleset/phpstan.neon src/ ; else echo PHPStan ruleset file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
name: 'PHPMD - Run' | |
run: 'if [ -f ruleset/.php_md.xml ]; then vendor/bin/phpmd src ansi ruleset/.php_md.xml ; else echo PHPMD config file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
name: 'GrumPHP - Run' | |
run: 'if [ -f grumphp.yml ]; then vendor/bin/grumphp run ; else echo Grumphp ruleset file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
uses: symfonycorp/security-checker-action@v3 | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
continue-on-error: true |