Skip to content

Commit

Permalink
fix: Update README sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Baragoin committed Jan 6, 2025
1 parent b700406 commit ba42939
Show file tree
Hide file tree
Showing 40 changed files with 6,728 additions and 369 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3"]
symfony: ["^5.4", "^6.4"]
php: ["8.2", "8.3"]
symfony: ["^6.4"]
node: ["20.x"]
sylius: ["2.0"]
mysql: ["8.0"]

env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v3
uses: actions/checkout@v4

-
name: Setup PHP
Expand Down Expand Up @@ -72,6 +72,9 @@ jobs:
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
Expand Down Expand Up @@ -124,10 +127,37 @@ jobs:
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
-
name: Install JS dependencies
run: (cd tests/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)
-
name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn build:prod)
-
name: Prepare test application cache
run: (cd tests/Application && bin/console cache:warmup -vvv)

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

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

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

-
name: Run PHPStan
Expand All @@ -140,3 +170,12 @@ jobs:
-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always

-
name: Upload Behat logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/node_modules/
/composer.lock

/compose.override.yml

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

Expand All @@ -16,3 +18,8 @@
# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
/.php-version
/php.ini

###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
13 changes: 13 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
;

return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
])
->setFinder($finder)
;
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include make/*.mk
include /usr/local/mez-tool-cli/Makefile


phpunit:
vendor/bin/phpunit
Expand Down
Loading

0 comments on commit ba42939

Please sign in to comment.