Repository navigation
Fix two latent VIPCS phpcs violations blocking CI #258
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
| name: Integration Tests | |
| on: | |
| push: | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpunit.xml.dist' | |
| - '.wp-env.json' | |
| - '.github/workflows/integration.yml' | |
| pull_request: | |
| branches: [develop, main] | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpunit.xml.dist' | |
| - '.wp-env.json' | |
| - '.github/workflows/integration.yml' | |
| workflow_dispatch: | |
| # Disable all permissions by default; grant minimal permissions per job | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| # Alias 'master' to 'latest' | |
| name: WP ${{ matrix.wp == 'master' && 'latest' || matrix.wp }} and PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Check lowest supported WP version, with the lowest supported PHP. | |
| - php: '7.4' | |
| wp: '6.4' | |
| # Check latest WP with the latest PHP. | |
| - php: 'latest' | |
| wp: 'master' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install wordpress environment | |
| run: npm -g install @wordpress/env | |
| - name: Setup PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer | |
| - name: Install Composer dependencies | |
| uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 | |
| with: | |
| composer-options: --prefer-dist --no-progress | |
| - name: Setup wp-env | |
| run: wp-env start | |
| env: | |
| WP_ENV_CORE: WordPress/WordPress#${{ matrix.wp }} | |
| - name: Run PHPUnit tests (single site) | |
| run: composer test:integration | |
| - name: Run PHPUnit tests (multisite) | |
| run: composer test:integration-ms |