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
48 changes: 0 additions & 48 deletions .docker/nginx/nginx.conf

This file was deleted.

5 changes: 0 additions & 5 deletions .docker/php/php.ini

This file was deleted.

32 changes: 32 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**/*.log
**/*.md
**/*.php~
**/._*
**/.dockerignore
**/.DS_Store
**/.git/
**/.gitattributes
**/.github
**/.gitignore
**/.gitkeep
**/.gitmodules
**/.idea
**/Dockerfile
**/Thumbs.db
**/docker-compose*.yaml
**/docker-compose*.yml
.editorconfig
.php_cs.cache
.travis.yml
composer.phar
docker/mysql/data/
etc/build/*
node_modules/
var/*
vendor/
public/assets/
public/build/
public/bundles/
public/css/
public/js/
public/media/
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ indent_size = 4
indent_style = space
indent_size = 2

[phpspec.yml{,.dist}]
indent_style = space
indent_size = 4

[phpstan.neon]
indent_style = space
indent_size = 4
Expand Down
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/.docker export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/behat.yml.dist export-ignore
/docker-compose.yml export-ignore
/docs export-ignore
/ecs.php export-ignore
/etc export-ignore
/Makefile export-ignore
/node_modules export-ignore
/phpspec.yml.dist export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/symfony.lock export-ignore
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Sylius/core-team
* @webgriffe/wg-devs
109 changes: 56 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
types: [ created ]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
Expand All @@ -21,14 +21,22 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.2", "8.3" ]
symfony: [ "^6.4", "^7.1" ]
node: ["20.x"]
mysql: ["8.0"]
php: [ "8.3", "8.4" ]
symfony: [ "^6.4", "^7.4" ]
sylius: [ "~2.1.10", "~2.2.1" ]
node: [ "22.x" ]
mysql: [ "8.4" ]

env:
APP_ENV: test
BEHAT_BASE_URL: "https://127.0.0.1:8080/"
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
SYLIUS_MESSENGER_TRANSPORT_MAIN_DSN: "sync://"
SYLIUS_MESSENGER_TRANSPORT_MAIN_FAILED_DSN: "sync://"
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_DSN: "sync://"
SYLIUS_MESSENGER_TRANSPORT_CATALOG_PROMOTION_REMOVAL_FAILED_DSN: "sync://"
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN: "sync://"
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_FAILED_DSN: "sync://"

steps:
-
Expand All @@ -40,7 +48,7 @@ jobs:
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: flex,symfony
tools: flex, symfony
coverage: none

-
Expand All @@ -64,22 +72,6 @@ jobs:
name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version

-
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: Validate composer.json
run: composer validate --ansi --strict

-
name: Get Composer cache directory
id: composer-cache
Expand All @@ -94,16 +86,12 @@ jobs:
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-

-
name: Configure global composer
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2"

-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
composer global config --no-plugins allow-plugins.symfony/flex true
composer config extra.symfony.require "${{ matrix.symfony }}"

-
Expand All @@ -113,9 +101,23 @@ jobs:

-
name: Install PHP dependencies
run: composer install --no-interaction --no-plugins
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
run: composer install --no-interaction

-
name: RUN EasyCodingStandard
run: vendor/bin/ecs check

-
name: Run PHPStan
run: vendor/bin/phpstan analyse

-
name: Run Psalm
run: vendor/bin/psalm

-
name: Run unit tests
run: vendor/bin/phpunit --colors=always --testsuite=unit

-
name: Get Yarn cache directory
Expand All @@ -133,65 +135,66 @@ 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:schema:create -vvv)
(vendor/bin/console doctrine:database:create -vvv)
(vendor/bin/console doctrine:schema:create -vvv)

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

-
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 database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Run ECS
run: vendor/bin/ecs check
name: Validate container
run: vendor/bin/console lint:container

-
name: Run PHPStan
run: vendor/bin/phpstan analyse
name: Run Non-unit PHPUnit tests
run: vendor/bin/phpunit --colors=always --testsuite=non-unit

-
name: Run Psalm
run: vendor/bin/psalm
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 PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
name: Install certificates
run: symfony server:ca:install || true

-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
name: Run webserver
run: symfony server:start --port=8080 --daemon

-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun

-
name: Upload Behat logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
path: etc/build/
if-no-files-found: ignore
compression-level: 6
overwrite: true

roave_bc_check:
name: Roave BC Check
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
/vendor/
/var/
/node_modules/
/drivers/
/composer.lock

/etc/build/*
!/etc/build/.gitignore

/tests/Application/yarn.lock

/.phpunit.result.cache
/behat.yml
/phpspec.yml
/phpunit.xml
/compose.override.yaml
/compose.override.yml
.phpunit.result.cache

# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
/.php-version
/php.ini

docker-compose.override.yml
/tests/TestApplication/.env.local
/tests/TestApplication/.env.*.local

!/tests/PIM/.gitkeep
/tests/PIM/
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See @CLAUDE.md
Loading
Loading