Bump symplify/monorepo-split-github-action from 2.4.2 to 2.4.4 #3788
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: "All Pull Request Tests" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '*.x' | |
| - '*.*.x' | |
| pull_request: | |
| jobs: | |
| monorepo-validate: | |
| if: github.event.pull_request.draft == false | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| name: "Composer and Monorepo Validate" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run General Tests | |
| uses: alleyinteractive/action-test-general@develop | |
| - name: Run Linter | |
| uses: alleyinteractive/action-test-php@develop | |
| with: | |
| php-version: '8.4' | |
| skip-services: 'true' | |
| skip-wordpress-install: 'true' | |
| test-command: 'composer validate --strict && composer monorepo-validate' | |
| - name: Get all packages | |
| id: output_data | |
| run: echo "matrix=$(vendor/bin/monorepo-builder packages-json | jq -c .)" >> $GITHUB_OUTPUT | |
| - name: Validate all packages | |
| run: | | |
| original_dir=$(pwd) | |
| for package in $(echo '${{ steps.output_data.outputs.matrix }}' | jq -r '.[]'); do | |
| echo "Validating package: $package" | |
| cd "$original_dir/src/mantle/$package" || exit 1 | |
| composer install --no-interaction --no-progress --no-plugins --prefer-dist | |
| composer validate --strict | |
| composer audit --no-dev --locked --ansi --no-interaction | |
| done | |
| lint-tests: | |
| if: github.event.pull_request.draft == false | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| name: "Lint Tests" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run General Tests | |
| uses: alleyinteractive/action-test-general@develop | |
| - name: Run Linter | |
| uses: alleyinteractive/action-test-php@develop | |
| with: | |
| php-version: '8.5' | |
| skip-services: 'true' | |
| skip-wordpress-install: 'true' | |
| test-command: 'composer lint' | |
| get-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| versions: ${{ steps.wp-versions.outputs.versions }} | |
| steps: | |
| - name: Get WordPress Versions | |
| id: wp-versions | |
| uses: alleyinteractive/action-get-wordpress-versions@develop | |
| with: | |
| minimum-version: "6.5" | |
| unit-tests: | |
| if: github.event.pull_request.draft == false | |
| needs: get-versions | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| dependencies: ["prefer-stable"] | |
| multisite: [true, false] | |
| # See core's PHP Compatibility chart: | |
| # https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/ | |
| php: [8.2, 8.3, 8.4, 8.5] | |
| wordpress: ${{fromJson(needs.get-versions.outputs.versions)}} | |
| vip-mu-plugins: [false] | |
| exclude: | |
| # WordPress 6.7 added support for PHP 8.4. | |
| - php: 8.4 | |
| wordpress: "6.6" | |
| - php: 8.4 | |
| wordpress: "6.5" | |
| # WordPress 6.9 added support for PHP 8.5. | |
| - php: 8.5 | |
| wordpress: "6.8" | |
| - php: 8.5 | |
| wordpress: "6.7" | |
| - php: 8.5 | |
| wordpress: "6.6" | |
| - php: 8.5 | |
| wordpress: "6.6" | |
| - php: 8.5 | |
| wordpress: "6.5" | |
| include: | |
| # Test with VIP MU Plugins enabled (using latest version of WordPress to prevent Jetpack compatibility issues). | |
| - php: 8.4 | |
| wordpress: "latest" | |
| dependencies: "prefer-stable" | |
| multisite: true | |
| vip-mu-plugins: true | |
| - php: 8.4 | |
| wordpress: "latest" | |
| dependencies: "prefer-stable" | |
| multisite: false | |
| vip-mu-plugins: true | |
| # Test with prefer-lowest selectively to check for compatibility issues with older dependencies. | |
| - php: 8.3 | |
| wordpress: "latest" | |
| dependencies: "prefer-lowest" | |
| multisite: true | |
| runs-on: ubuntu-latest | |
| name: "PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }} ${{ matrix.multisite && 'Multisite ' || '' }}Dependencies ${{ matrix.dependencies }}${{ matrix.vip-mu-plugins && ' vip-mu-plugins' || '' }}" | |
| env: | |
| MANTLE_INSTALL_VIP_MU_PLUGINS: ${{ matrix.vip-mu-plugins && '1' || '0' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run PHP Tests | |
| uses: alleyinteractive/action-test-php@develop | |
| with: | |
| install-command: composer update --${{ matrix.dependencies }} --prefer-dist --no-interaction --no-progress | |
| php-version: '${{ matrix.php }}' | |
| skip-wordpress-install: 'true' | |
| test-command: 'composer phpunit' | |
| wordpress-host: 'false' | |
| wordpress-multisite: '${{ matrix.multisite }}' | |
| wordpress-version: '${{ matrix.wordpress }}' | |
| parallel-unit-tests: | |
| if: github.event.pull_request.draft == false | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.3, 8.4] | |
| wordpress: ["latest"] | |
| vip-mu-plugins: [true, false] | |
| runs-on: ubuntu-latest | |
| name: "Parallel PR Tests PHP ${{ matrix.php }} WordPress ${{ matrix.wordpress }}" | |
| env: | |
| MANTLE_INSTALL_VIP_MU_PLUGINS: ${{ matrix.vip-mu-plugins && '1' || '0' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run PHP Tests | |
| uses: alleyinteractive/action-test-php@develop | |
| with: | |
| install-command: 'composer require --dev --no-update brianium/paratest && composer update --prefer-dist --no-interaction --no-progress' | |
| php-version: '${{ matrix.php }}' | |
| skip-wordpress-install: 'true' | |
| test-command: 'WP_PHPUNIT_PATH=vendor/bin/paratest ./vendor/bin/paratest' | |
| wordpress-host: 'false' | |
| wordpress-multisite: 'true' | |
| wordpress-version: '${{ matrix.wordpress }}' | |
| # This required job ensures that all PR checks have passed before merging. | |
| all-pr-checks-passed: | |
| name: All PR checks passed | |
| needs: | |
| - monorepo-validate | |
| - lint-tests | |
| - unit-tests | |
| - parallel-unit-tests | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check job statuses | |
| run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then | |
| echo "One or more jobs failed" | |
| exit 1 | |
| elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then | |
| echo "One or more jobs were cancelled" | |
| exit 1 | |
| else | |
| echo "All jobs passed or were skipped" | |
| exit 0 | |
| fi |