Skip to content

Use normalized namespace. #76

Use normalized namespace.

Use normalized namespace. #76

name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: 'example/server/package-lock.json'
- 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
cd example/server && npm update
- name: Run test suite
run: composer run-script test
- name: Run examples
run: |
cd example/server && node index.js &
sleep 5
cd example/client
php -f binary-event.php
php -f handshake-auth.php
php -f header-auth.php
php -f keep-alive.php
php -f polling.php