E2E CI: parallelize projects via matrix (one shard per Playwright pro… #512
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: Unit tests & PHPCS | |
| on: | |
| push: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-and-code-style: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| php: ['7.4', '8.5'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer install --prefer-dist | |
| - name: Run tests | |
| run: vendor/bin/phpunit --bootstrap __tests__/bootstrap.php __tests__ | |
| - name: Run SDK tests | |
| run: vendor/bin/phpunit -v -c ./phpunit-sdk-unit.xml | |
| - name: Run PHPCS | |
| run: vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=vendor/ . |