CI #132
This file contains hidden or 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: CI | |
| on: | |
| pull_request: null | |
| push: | |
| branches: | |
| - 1.x | |
| schedule: | |
| - cron: "48 7 * * 1" | |
| jobs: | |
| Tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: | |
| - '8.4' | |
| - '8.3' | |
| - '8.2' | |
| - '8.1' | |
| - '8.0' | |
| - '7.4' | |
| dependencies: ['highest'] | |
| include: | |
| - description: 'Symfony 8' | |
| composer-minimum-stability: 'beta' | |
| php: '8.4' | |
| symfony_require: '^8.0.0-BETA-1' | |
| - description: 'Symfony 6.4' | |
| php: '8.2' | |
| symfony_require: '^6.4' | |
| - description: 'Symfony 5.4' | |
| php: '8.1' | |
| symfony_require: '^5.4' | |
| - description: 'Symfony 4.4' | |
| php: '7.4' | |
| symfony_require: '^4.4' | |
| - description: '(prefer lowest)' | |
| php: '7.4' | |
| symfony_require: '^4.4' | |
| dependencies: 'lowest' | |
| deprecations: 'disabled' | |
| name: PHP ${{ matrix.php }} ${{ matrix.description }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: xdebug | |
| tools: flex | |
| - name: Configure Composer minimum-stability | |
| if: matrix.composer-minimum-stability | |
| run: composer config minimum-stability ${{ matrix.composer-minimum-stability }} | |
| - name: Remove unneeded deps during tests | |
| run: composer remove --dev --no-update facile-it/facile-coding-standard | |
| - name: Install dependencies | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| env: | |
| COMPOSER_NO_SECURITY_BLOCKING: "1" | |
| SYMFONY_REQUIRE: ${{ matrix.symfony_require }} | |
| - name: Run tests | |
| run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
| env: | |
| SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.deprecations }} | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| files: './coverage.xml' | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| StaticAnalysis: | |
| name: ${{ matrix.description }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - description: Validate composer.json | |
| script: composer validate | |
| - description: Code style | |
| script: composer cs-check | |
| - description: PHPStan | |
| script: vendor/bin/phpstan analyze | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 7.4 | |
| - name: Install dependencies | |
| uses: "ramsey/composer-install@v3" | |
| - run: ${{ matrix.script }} |