Clean playwright-server.js #43
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: "CI" | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| cs: | |
| name: "Code style" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup 8.3" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| coverage: none | |
| tools: php-cs-fixer | |
| - name: "Composer: validate" | |
| run: composer validate --strict | |
| - name: "Composer: install" | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: "Php-CS-Fixer: version" | |
| run: vendor/bin/php-cs-fixer -V | |
| - name: "Php-CS-Fixer: check" | |
| run: vendor/bin/php-cs-fixer fix --diff --dry-run | |
| sa: | |
| name: "Static Analysis" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup 8.4" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: pcov | |
| tools: phpstan | |
| - name: "Composer: install" | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: "PHPStan: version" | |
| run: vendor/bin/phpstan --version | |
| - name: "PHPStan: analyze" | |
| run: vendor/bin/phpstan | |
| unit-tests: | |
| name: "Unit Tests (PHP ${{ matrix.php-version }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.3', '8.4'] | |
| fail-fast: false | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup ${{ matrix.php-version }}" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: pcov | |
| tools: phpunit | |
| - name: "Composer: install" | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: "PHPUnit: unit tests" | |
| run: vendor/bin/phpunit --testsuite=unit | |
| integration-tests: | |
| name: "Integration Tests (PHP ${{ matrix.php-version }} ${{ matrix.dependencies }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - php-version: '8.3' | |
| dependencies: 'low' | |
| - php-version: '8.4' | |
| dependencies: 'high' | |
| fail-fast: false | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup ${{ matrix.php-version }}" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: pcov | |
| tools: phpunit | |
| - name: "Node: setup" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: "Composer: install (${{ matrix.dependencies }})" | |
| run: | | |
| if [ "${{ matrix.dependencies }}" == "low" ]; then | |
| composer update --prefer-lowest --prefer-dist --no-interaction --no-progress | |
| else | |
| composer install --prefer-dist --no-interaction --no-progress | |
| fi | |
| - name: "Playwright: install browsers" | |
| run: composer run install-browsers | |
| - name: "PHPUnit: version" | |
| run: vendor/bin/phpunit --version | |
| - name: "PHPUnit: all tests with coverage" | |
| run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
| - name: "Codecov: upload coverage" | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.php-version == '8.4' && matrix.dependencies == 'high' | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |