Skip to content

feature #3773 [LiveComponent] Add LiveResponse::remove() to trigger c… #3356

feature #3773 [LiveComponent] Add LiveResponse::remove() to trigger c…

feature #3773 [LiveComponent] Add LiveResponse::remove() to trigger c… #3356

Workflow file for this run

name: Unit Tests
defaults:
run:
shell: bash
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '.github/workflows/app-tests.yaml'
- '.github/workflows/demo-native.yaml'
- 'apps/demo-native/**'
- 'apps/e2e/**'
- 'src/*/doc/**'
- 'src/**/*.md'
pull_request:
paths-ignore:
- '.github/workflows/app-tests.yaml'
- '.github/workflows/demo-native.yaml'
- 'apps/demo-native/**'
- 'apps/e2e/**'
- 'src/*/doc/**'
- 'src/**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
php:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
php-version: ['8.4', '8.5']
dependency-version: ['']
symfony-version: ['']
minimum-stability: ['stable']
os: ['']
include:
- minimum-stability: 'dev'
php-version: '8.5'
# lowest deps
- php-version: '8.4'
dependency-version: 'lowest'
# 7.4 LTS
- php-version: '8.4'
symfony-version: '7.4.*'
- php-version: '8.4'
symfony-version: '7.4.*'
os: 'windows-latest'
# Explicit Symfony versions
- php-version: '8.4'
symfony-version: '8.1.*'
- php-version: '8.5'
symfony-version: '8.1.*'
- php-version: '8.5'
symfony-version: '8.1.*'
os: 'windows-latest'
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version || '>=7.4' }}
# https://github.com/spatie/phpunit-snapshot-assertions#usage-in-ci
CREATE_SNAPSHOTS: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Configure environment
run: |
echo COLUMNS=120 >> $GITHUB_ENV
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }} --ansi' >> $GITHUB_ENV
echo COMPOSER_UP='composer update ${{ matrix.dependency-version == 'lowest' && '--prefer-lowest' || '' }} --no-progress --no-interaction --ansi' >> $GITHUB_ENV
echo PHPUNIT='vendor/bin/phpunit ${{ matrix.dependency-version == 'lowest' && '--exclude-group skip-on-lowest' || '' }} ${{ matrix.os == 'windows-latest' && '--exclude-group transient-on-windows' || '' }}' >> $GITHUB_ENV
[ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak
# Exclude packages that don't have unit tests yet
EXCLUDED_PACKAGES="^$"
# Exclude deprecated packages when testing against lowest dependencies
#if [ "${{ matrix.dependency-version }}" = "lowest" ]; then
# EXCLUDED_PACKAGES="$EXCLUDED_PACKAGES"
#fi
PACKAGES=$(find src/ -mindepth 2 -type f -name composer.json -not -path "*/vendor/*" -printf '%h\n' | sed 's/^src\///' | grep -Ev "$EXCLUDED_PACKAGES" | sort | tr '\n' ' ')
echo "Packages: $PACKAGES"
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ matrix.os == 'windows-latest' && 'pdo_sqlite,sqlite3,fileinfo,gd,zip' || '' }}
tools: flex
- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache packages dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}-${{ hashFiles('src/**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}
- name: Install root dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
working-directory: ${{ github.workspace }}
- name: Build root packages
run: php .github/build-packages.php
- name: Run packages tests
run: |
source .github/workflows/.utils.sh
_run_package_tests
js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2.0.2
with:
cache: true
- run: pnpm run test:unit