Update view mode #687
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: Integration Tests | |
| on: | |
| # Run on all pushes and on all pull requests. | |
| # Prevent the "push" build from running when there are only irrelevant changes. | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| pull_request: | |
| workflow_call: | |
| # Cancels all previous workflow runs for the same branch that have not yet completed. | |
| concurrency: | |
| # The concurrency group contains the workflow name and the branch name. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: PHP ${{ matrix.php }} | |
| runs-on: ubuntu-24.04 | |
| env: | |
| WP_VERSION: ${{ matrix.wp }} | |
| strategy: | |
| # Note: Different PHP versions use different PHPUnit versions. | |
| # Keys: | |
| # - coverage: Whether to run the tests with code coverage. | |
| # - experimental: Whether the build is "allowed to fail". | |
| matrix: | |
| php: ['8.1', '8.2', '8.3'] | |
| wp: ['latest'] | |
| coverage: [none] | |
| experimental: [false] | |
| include: | |
| - php: '8.4' | |
| coverage: pcov | |
| extensions: pcov | |
| ini-values: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\"" | |
| experimental: false | |
| - php: '8.5' | |
| wp: 'trunk' | |
| experimental: true | |
| fail-fast: false | |
| continue-on-error: ${{ matrix.experimental }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: ${{ matrix.extensions }} | |
| ini-values: ${{ matrix.ini-values }} | |
| coverage: ${{ matrix.coverage }} | |
| - name: Setup problem matchers for PHP | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| - name: Setup Problem Matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Install Composer dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| composer-options: --ignore-platform-reqs | |
| - name: Install Subversion | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install subversion | |
| - name: Start MySQL Service | |
| run: sudo systemctl start mysql.service | |
| - name: Prepare environment for integration tests | |
| run: composer testwp-install --no-interaction | |
| - name: Run integration tests | |
| if: ${{ !matrix.experimental && matrix.coverage == 'none' }} | |
| run: composer testwp --no-interaction | |
| - name: Run integration tests (experimental) | |
| if: ${{ matrix.experimental }} | |
| run: composer testwp-experimental --no-interaction | |
| - name: Run integration tests (with code coverage) | |
| if: ${{ matrix.coverage == 'pcov' }} | |
| run: composer testwp-coverage --no-interaction |