fix syntax error #105
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: Tests | |
| on: | |
| push: | |
| branches: ["master", "main"] | |
| pull_request: | |
| branches: ["master", "main"] | |
| permissions: | |
| contents: read | |
| env: | |
| NODE_VERSION: latest | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| php-versions: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] | |
| include: | |
| - php-versions: "7.4" | |
| phpunit-versions: 9 | |
| - php-versions: "8.0" | |
| phpunit-versions: 9 | |
| - php-versions: "8.1" | |
| phpunit-versions: 10 | |
| - php-versions: "8.2" | |
| phpunit-versions: 11 | |
| - php-versions: "8.3" | |
| phpunit-versions: 12 | |
| - php-versions: "8.4" | |
| phpunit-versions: 12 | |
| runs-on: ${{ matrix.operating-system }} | |
| name: OS ${{ matrix.operating-system }} | PHP ${{ matrix.php-versions }} | |
| steps: | |
| - name: Setup PHP ${{ matrix.php-versions }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, intl, xdebug, json, sockets | |
| ini-values: max_execution_time=360 | |
| coverage: xdebug | |
| tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: PHP info | |
| run: php -v | |
| - name: Set git to use LF | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - uses: actions/checkout@v4 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Install Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Starting local web server | |
| # bash shell is required for Windows, otherwise the background | |
| # server does not start and work properly | |
| shell: bash | |
| run: npm run start-server & | |
| - name: Wait for server to start up | |
| run: npx wait-on --timeout 15000 http://127.0.0.1:3000 | |
| - name: Server warm up | |
| run: sleep 5 | |
| - if: matrix.php-versions != '8.4' | |
| name: Run test suite | |
| shell: bash | |
| run: npm run test | |
| - if: matrix.php-versions == '8.4' | |
| name: Run test suite for PHP 8.4 | |
| shell: bash | |
| run: npm run test:8.4 |