Refactor "test_package.sh" to its original purpose, add multiples che… #244
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
# Deprecated, will be removed in favor of browser-tests.yml | |
name: Functional Tests | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
paths: | |
- '.github/workflows/functional-tests.yml' | |
- 'src/Turbo/**' | |
pull_request: | |
paths: | |
- '.github/workflows/functional-tests.yml' | |
- 'src/Turbo/**' | |
jobs: | |
turbo-tests: | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5'] | |
dependency-version: [''] | |
symfony-version: [''] | |
minimum-stability: ['stable'] | |
os: [''] | |
include: | |
# dev packages (probably not needed to have multiple such jobs) | |
- minimum-stability: 'dev' | |
php-version: '8.5' | |
# lowest deps | |
- php-version: '8.1' | |
dependency-version: 'lowest' | |
# LTS version of Symfony | |
- php-version: '8.1' | |
symfony-version: '6.4.*' | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.symfony-version || '>=5.4' }} | |
services: | |
mercure: | |
image: dunglas/mercure | |
env: | |
SERVER_NAME: :3000 | |
MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!' | |
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!' | |
MERCURE_EXTRA_DIRECTIVES: | | |
anonymous | |
cors_origins * | |
ports: | |
- 3000:3000 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: flex | |
- name: Install root dependencies | |
uses: ramsey/composer-install@v3 | |
with: | |
working-directory: ${{ github.workspace }} | |
- name: Build root packages | |
run: php .github/build-packages.php | |
- name: Configure composer dependencies stability | |
run: composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }} | |
working-directory: src/Turbo | |
- name: Install dependencies with composer | |
uses: ramsey/composer-install@v3 | |
with: | |
working-directory: src/Turbo | |
dependency-versions: ${{ matrix.dependency-version }} | |
- name: Install JavaScript dependencies | |
working-directory: src/Turbo/tests/app | |
run: | | |
php public/index.php importmap:install | |
php public/index.php asset-map:compile | |
- name: Create DB | |
working-directory: src/Turbo/tests/app | |
run: php public/index.php doctrine:schema:create | |
- name: Run tests | |
working-directory: src/Turbo | |
run: | | |
[ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak | |
vendor/bin/simple-phpunit | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=1' |