Run Tests #47
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: Run Tests | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| php-tests: | |
| name: PHP ${{ matrix.php }} | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[ci skip]') | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.4', '8.5'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer:v2 | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, fileinfo | |
| coverage: none | |
| - name: Install PHP dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader | |
| - name: Install Livewire for Livewire test lanes | |
| run: composer require "livewire/livewire:^4" --dev --no-interaction --no-progress | |
| - name: Run PHP test suite | |
| run: ./vendor/bin/pest tests/php/Unit tests/php/Feature --ci | |
| js-tests: | |
| name: JavaScript | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[ci skip]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, fileinfo | |
| coverage: none | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install PHP dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader | |
| - name: Install Livewire for browser tests | |
| run: composer require "livewire/livewire:^4" --dev --no-interaction --no-progress | |
| - name: Install JavaScript dependencies | |
| run: npm ci | |
| - name: Run JavaScript test suite | |
| run: npm run test:js | |
| browser-tests: | |
| name: Browser | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[ci skip]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, fileinfo | |
| coverage: none | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install PHP dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader | |
| - name: Install JavaScript dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run browser test suite | |
| run: ./vendor/bin/pest tests/php/Browser --ci |