-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was merged into the main branch. Discussion ---------- Here is a PR aiming to fix the build and add support for Sylius 1.13. I also: - [x] Remove support for Sylius 1.11. - [x] Add Panther config to run Behat. - [x] Add `symfony/runtime` on the test application. - [x] Update PHPStan config. - [x] Update Github action build. - [x] Fix the Behat build by updating number format on scenarios. Commits ------- 31ff455 Update all config files and remove some no more necessary stuffs 91ed886 Update bootstrap file to get env vars eefaf0c Little deprecation fixed c56ab66 Ignore public/build folder bbf92a9 Restore the same config as on the main branch 6bbd7d6 Fix int to float prices 072ff7b Fix thousand separator 8fc6e0a Fix PantherDriver reference f077335 Fix expected message argument ordering ea489a9 Wrong format fb08556 Increase timeout to let the ajax query be done c3eaecc Fix build for Sylius 1.12 a35c891 Update from Sylius-Standard config e79a18b Cleanup and remove no more required codes 66e2cb6 ECS fix f53509e Fix wrong scenario description 49359d1 Sync config with sylius/sylius 0de0c7a Try to rely on Sylius Behat helpers to know if a form or an ajax request is pending 557fc96 Refactor to merge two similar methods
- Loading branch information
Showing
75 changed files
with
477 additions
and
507 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
name: Build | ||
|
||
on: | ||
push: ~ | ||
push: | ||
branches-ignore: | ||
- 'dependabot/**' | ||
pull_request: ~ | ||
release: | ||
types: [created] | ||
|
@@ -19,36 +21,31 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ["8.0", "8.1"] | ||
symfony: ["^5.4", "^6.0"] | ||
sylius: ["~1.11.10", "~1.12.0"] | ||
node: ["16.x"] | ||
mysql: ["5.7", "8.0"] | ||
|
||
exclude: | ||
- sylius: "~1.11.10" | ||
symfony: "^6.0" | ||
|
||
php: ["8.1","8.2","8.3"] | ||
symfony: ["^5.4", "^6.4"] | ||
sylius: ["~1.12.0", "~1.13.0"] | ||
node: ["20.x"] | ||
mysql: ["8.0"] | ||
env: | ||
APP_ENV: test | ||
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}" | ||
|
||
steps: | ||
- | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- | ||
name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php }}" | ||
extensions: intl, gd | ||
tools: symfony | ||
tools: flex, symfony | ||
coverage: none | ||
|
||
- | ||
name: Setup Node | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "${{ matrix.node }}" | ||
|
||
|
@@ -70,54 +67,47 @@ 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 | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php-${{ matrix.php }}-composer- | ||
- | ||
name: Restrict Symfony version | ||
if: matrix.symfony != '' | ||
run: | | ||
composer global config --no-plugins allow-plugins.symfony/flex true | ||
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10" | ||
composer config extra.symfony.require "${{ matrix.symfony }}" | ||
- | ||
name: Restrict Sylius version | ||
if: matrix.sylius != '' | ||
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction | ||
|
||
- | ||
name: Install PHP dependencies | ||
run: composer update --no-interaction | ||
run: composer install --no-interaction | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
|
||
- | ||
name: Install Behat driver | ||
run: vendor/bin/bdi browser:google-chrome drivers | ||
|
||
- | ||
name: Get Yarn cache directory | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- | ||
name: Cache Yarn | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }} | ||
|
@@ -138,7 +128,7 @@ jobs: | |
name: Prepare test application assets | ||
run: | | ||
(cd tests/Application && bin/console assets:install public -vvv) | ||
(cd tests/Application && yarn build) | ||
(cd tests/Application && yarn build:prod) | ||
- | ||
name: Prepare test application cache | ||
|
@@ -162,7 +152,7 @@ jobs: | |
|
||
- | ||
name: Run PHPStan | ||
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/ | ||
run: vendor/bin/phpstan analyse | ||
|
||
- | ||
name: Run PHPSpec | ||
|
@@ -178,7 +168,7 @@ jobs: | |
|
||
- | ||
name: Upload Behat logs | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: Behat logs | ||
|
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
return static function (ECSConfig $config): void { | ||
$config->import('vendor/sylius-labs/coding-standard/ecs.php'); | ||
|
||
$config->paths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]); | ||
$config->skip([ | ||
'**/var/*', | ||
'**/node_modules/*', | ||
]); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Feature: Being unable to create order when item prices are not defined for chann | |
Given the store operates on a channel named "Web-US" in "USD" currency | ||
And the store operates on a channel named "Web-EC" in "USD" currency | ||
And the store operates on a channel named "Web-PW" in "USD" currency | ||
And the store has a product "Stark Coat" priced at "$100" available in channel "Web-US" and channel "Web-EC" | ||
And the store has a product "Stark Coat" priced at "$100.00" available in channel "Web-US" and channel "Web-EC" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And there is a customer account "[email protected]" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ Feature: Creating order with different billing address | |
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a product "Stark Coat" priced at "$100" | ||
And the store has a product "Lannister Banner" priced at "$40" | ||
And the store has a product "Stark Coat" priced at "$100.00" | ||
And the store has a product "Lannister Banner" priced at "$40.00" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And there is a customer account "[email protected]" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,10 @@ Feature: Creating order with multiple items | |
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has a product "Stark Coat" priced at "$100" | ||
And the store has a product "Lannister Banner" priced at "$40" | ||
And the store has a product "Greyjoy Boat" priced at "$1000" | ||
And the store has a product "Targaryen Shield" priced at "$200" | ||
And the store has a product "Stark Coat" priced at "$100.00" | ||
And the store has a product "Lannister Banner" priced at "$40.00" | ||
And the store has a product "Greyjoy Boat" priced at "$1,000.00" | ||
And the store has a product "Targaryen Shield" priced at "$200.00" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And there is a customer account "[email protected]" | ||
|
Oops, something went wrong.