Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,10 @@ jobs:
name: Install certificates
run: symfony server:ca:install

-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &

-
name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)

-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

-
name: Cache Composer
Expand Down Expand Up @@ -133,40 +125,48 @@ jobs:

-
name: Install JS dependencies
run: (cd tests/Application && yarn install)
run: cd vendor/sylius/test-application && yarn install

-
name: Prepare test application database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:migrations:migrate -vvv)
vendor/bin/console doctrine:database:create -vvv
vendor/bin/console doctrine:migrations:migrate -vvv

-
name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn prod)
vendor/bin/console assets:install -vvv
cd vendor/sylius/test-application && yarn encore dev

-
name: Prepare test application cache
run: (cd tests/Application && bin/console cache:warmup -vvv)
run: vendor/bin/console cache:warmup -vvv

-
name: Load fixtures in test application
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
run: vendor/bin/console sylius:fixtures:load -n

-
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Validate database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)
run: vendor/bin/console doctrine:schema:validate

-
name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction

-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &

-
name: Run webserver
run: symfony server:start --port=8080 --daemon

-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@

/behat.yml
/phpunit.xml
tests/Application/yarn.lock

/tests/TestApplication/.env.local
/tests/TestApplication/.env.*.local

.phpunit.result.cache
4 changes: 2 additions & 2 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ default:
show_auto: false

FriendsOfBehat\SymfonyExtension:
bootstrap: tests/Application/config/bootstrap.php
bootstrap: vendor/sylius/test-application/config/bootstrap.php
kernel:
class: Tests\Sylius\WishlistPlugin\Application\Kernel
class: Sylius\TestApplication\Kernel

FriendsOfBehat\VariadicExtension: ~

Expand Down
20 changes: 11 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^9.5",
"sylius/sylius-rector": "^2.0",
"sylius/test-application": "^2.0.0@alpha",
"sylius-labs/coding-standard": "^4.4",
"sylius-labs/suite-tags-extension": "~0.2",
"symfony/browser-kit": "^6.4 || ^7.1",
Expand All @@ -46,29 +47,30 @@
}
},
"autoload-dev": {
"classmap": ["tests/Application/Kernel.php"],
"psr-4": {
"Sylius\\WishlistPlugin\\": "src/",
"Tests\\Sylius\\WishlistPlugin\\": "tests/",
"Sylius\\Tests\\Api\\": ["vendor/sylius/sylius/tests/Api/"]
"Sylius\\Tests\\Api\\": "vendor/sylius/sylius/tests/Api/"
}
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/thanks": true,
"php-http/discovery": true
"php-http/discovery": true,
"symfony/flex": true,
"symfony/runtime": true
},
"preferred-install": {
"sylius/sylius": "source"
}
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
"extra": {
"symfony": {
"allow-contrib": false,
"require": "^7.1"
},
"public-dir": "vendor/sylius/test-application/public"
}
}
5 changes: 5 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
imports:
- { resource: "@SyliusWishlistPlugin/config/twig_hooks/**/*.yaml" }

api_platform:
mapping:
paths:
- '%sylius_wishlist_api_platform_mapping_path%'
19 changes: 6 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/Application/config/bootstrap.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="vendor/sylius/test-application/config/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />

<env name="APP_SECRET" value="''" />
<env name="APP_ENV" value="test"/>
<env name="APP_DEBUG" value="0"/>
<env name="SHELL_VERBOSITY" value="-1" />

<server name="KERNEL_CLASS" value="Tests\Sylius\WishlistPlugin\Application\Kernel" />
<server name="KERNEL_CLASS_PATH" value="/tests/Application/Kernel.php" />
<server name="KERNEL_CLASS" value="Sylius\TestApplication\Kernel" />
<server name="IS_DOCTRINE_ORM_SUPPORTED" value="true"/>
<server name="SHELL_VERBOSITY" value="-1" />
<server name="ESCAPE_JSON" value="true" />
</php>

<testsuites>
Expand Down
44 changes: 0 additions & 44 deletions tests/Application/.env

This file was deleted.

10 changes: 0 additions & 10 deletions tests/Application/.env.test

This file was deleted.

20 changes: 0 additions & 20 deletions tests/Application/.eslintrc.js

This file was deleted.

23 changes: 0 additions & 23 deletions tests/Application/.gitignore

This file was deleted.

Loading