Skip to content

[LiveComponent] Tokenize classes on all allowed whitespaces #1

[LiveComponent] Tokenize classes on all allowed whitespaces

[LiveComponent] Tokenize classes on all allowed whitespaces #1

name: Symfony UX Live Components
on:
push:
paths:
- 'src/LiveComponent/**'
pull_request:
paths:
- 'src/LiveComponent/**'
jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: zip
- uses: ramsey/composer-install@v3
with:
working-directory: src/LiveComponent
- name: Install PHPUnit dependencies
working-directory: src/LiveComponent
run: vendor/bin/simple-phpunit --version
- name: PHPStan
working-directory: src/LiveComponent
run: vendor/bin/phpstan analyse --no-progress
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.3']
include:
- php-version: '8.1'
dependency-version: 'lowest'
- php-version: '8.3'
dependency-version: 'highest'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install LiveComponent packages
uses: ramsey/composer-install@v3
with:
working-directory: src/LiveComponent
dependency-versions: ${{ matrix.dependency-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install JavaScript dependencies
working-directory: src/LiveComponent/tests/app
run: yarn install
- name: Build JavaScript
working-directory: src/LiveComponent/tests/app
run: yarn build
- name: Run tests
working-directory: src/LiveComponent
run: vendor/bin/simple-phpunit
env:
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=1'