chore(5.x): release 5.12.2 #2683
Workflow file for this run
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
| # from doctrine/instantiator: | |
| # https://github.com/doctrine/instantiator/blob/97aa11bb71ad6259a8c5a1161b4de2d6cdcc5501/.github/workflows/continuous-integration.yml | |
| name: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - "*.x" | |
| push: | |
| branches: | |
| - "*.x" | |
| schedule: | |
| - cron: "21 4 * * 5" # “At 04:21 on Friday.” | |
| env: | |
| fail-fast: true | |
| jobs: | |
| phpunit: | |
| name: PHPUnit | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: | |
| - core | |
| - fos-rest | |
| - jms-serializer | |
| - hateoas | |
| php-version: | |
| - 8.2 | |
| - 8.3 | |
| - 8.4 | |
| - 8.5 | |
| symfony-require: | |
| - "6.4" | |
| - "7.2" | |
| - "7.3" | |
| - "7.4" | |
| - "8.0" | |
| composer-flags: | |
| - "" | |
| include: | |
| - test-group: core | |
| php-version: 8.2 | |
| symfony-require: "6.4" | |
| composer-flags: "--prefer-lowest" | |
| exclude: | |
| # Symfony 8.x: Requires: PHP 8.4 or higher | |
| - php-version: 8.2 | |
| symfony-require: 8.0 | |
| - php-version: 8.3 | |
| symfony-require: 8.0 | |
| # https://github.com/FriendsOfSymfony/FOSRestBundle/pull/2429 Does not support Symfony 8.x yet | |
| - test-group: fos-rest | |
| symfony-require: "8.0" | |
| # Test only the lowest and highest PHP versions for each optional dependency test group | |
| - test-group: fos-rest | |
| php-version: 8.3 | |
| - test-group: fos-rest | |
| php-version: 8.4 | |
| - test-group: jms-serializer | |
| php-version: 8.3 | |
| - test-group: jms-serializer | |
| php-version: 8.4 | |
| - test-group: hateoas | |
| php-version: 8.3 | |
| - test-group: hateoas | |
| php-version: 8.4 | |
| # Test only the highest versions for a symfony major for each optional dependency test group | |
| - test-group: fos-rest | |
| symfony-require: "7.2" | |
| - test-group: fos-rest | |
| symfony-require: "7.3" | |
| - test-group: jms-serializer | |
| symfony-require: "7.2" | |
| - test-group: jms-serializer | |
| symfony-require: "7.3" | |
| - test-group: hateoas | |
| symfony-require: "7.2" | |
| - test-group: hateoas | |
| symfony-require: "7.3" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install PHP with coverage | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer, flex | |
| coverage: pcov | |
| - name: Setup dependencies | |
| uses: ./.github/workflows/common/composer-install | |
| with: | |
| symfony-version: ${{ matrix.symfony-require }} | |
| composer-flags: ${{ matrix.composer-flags }} | |
| test-group: ${{ matrix.test-group }} | |
| - name: PHPUnit Tests | |
| run: | | |
| if [ "${{ matrix.test-group }}" == "core" ]; then | |
| PHPUNIT_ARGS="--exclude-group fos-rest,jms-serializer,hateoas" | |
| else | |
| PHPUNIT_ARGS="--group ${{ matrix.test-group }}" | |
| fi | |
| vendor/bin/phpunit \ | |
| --configuration phpunit.xml.dist \ | |
| --log-junit=junit-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.test-group }}.xml \ | |
| --coverage-clover=coverage-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.test-group }}.xml \ | |
| --coverage-filter=src/ \ | |
| $PHPUNIT_ARGS | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: phpunit-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.test-group }}${{ matrix.composer-flags }} | |
| path: | | |
| coverage*.xml | |
| junit*.xml | |
| if-no-files-found: error | |
| retention-days: 2 | |
| codecov: | |
| name: Codecov | |
| runs-on: ubuntu-22.04 | |
| needs: phpunit | |
| timeout-minutes: 5 | |
| if: github.event.pull_request.user.login != 'dependabot[bot]' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v8 | |
| - name: Upload test results to Codecov.io | |
| uses: codecov/test-results-action@v1 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload code coverage to Codecov.io | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| php-cs-fixer: | |
| name: PHP-CS-Fixer | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install PHP without coverage | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.3 | |
| tools: composer, flex | |
| coverage: none | |
| - name: Setup dependencies | |
| uses: ./.github/workflows/common/composer-install | |
| with: | |
| symfony-version: "7.2.*" | |
| test-group: all | |
| - name: Run PHP-CS-Fixer | |
| run: vendor/bin/php-cs-fixer check -v --diff | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install PHP without coverage | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.3 | |
| tools: composer, flex | |
| coverage: none | |
| - name: Setup dependencies | |
| uses: ./.github/workflows/common/composer-install | |
| with: | |
| symfony-version: "7.2.*" | |
| test-group: all | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse --no-progress --no-interaction | |
| ui-assets: | |
| name: UI Assets | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| working-directory: ./utils | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 2 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22.x' | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| package_json_file: utils/package.json | |
| cache: true | |
| cache_dependency_path: utils/pnpm-lock.yaml | |
| - name: Setup dependencies | |
| run: pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Rebuild UI files | |
| run: pnpm run swagger && pnpm run redoc && pnpm run scalar && pnpm run stoplight | |
| - name: Check UI files are in sync | |
| run: | | |
| if [ -n "$(git status --porcelain -- ../public)" ]; then | |
| echo "::error::public/ does not match utils/package.json. Run the UI scripts in utils/ and commit the result." | |
| git status --short -- ../public | |
| git diff --stat -- ../public | |
| exit 1 | |
| fi |