diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5da7b9ff..f823f5c9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1 @@ -* @BitBagCommerce -* @Sylius/core-team +* @Sylius/key-contributors @Sylius/development-team diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ea63b41..dc50c313 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,22 +17,26 @@ jobs: runs-on: ubuntu-latest name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, - MySQL ${{ matrix.mysql }}, Node ${{ matrix.node }}" + MySQL ${{ matrix.mysql }}, State Machine Adapter ${{ matrix.state_machine_adapter }}" strategy: fail-fast: false matrix: - php: [ "8.1", "8.2", "8.3" ] - symfony: ["^5.4", "^6.4"] - sylius: [ "~1.13.0", "~1.14.0" ] - node: [ "18.x", "20.x" ] - mysql: ["8.0"] - - exclude: - - - php: "8.3" - symfony: "^5.4" - sylius: "~1.13.0" + php: [ "8.2", "8.3" ] + symfony: [ "^6.4", "^7.1" ] + sylius: [ "^2.0" ] + node: [ "20.x" ] + mysql: [ "8.4" ] + state_machine_adapter: ["symfony_workflow"] + + include: + - php: "8.3" + symfony: "^7.1" + database: "mysql" + sylius: "~2.0.1" + mysql: "8.4" + node: "20.x" + state_machine_adapter: "winzou_state_machine" env: APP_ENV: test @@ -52,15 +56,122 @@ jobs: coverage: none - - name: Build test application - uses: SyliusLabs/BuildTestAppAction@v1.3 + name: Setup Node + uses: actions/setup-node@v4 with: - sylius-version: "${{ matrix.sylius }}" - symfony-version: "${{ matrix.symfony }}" - mysql-version: "${{ matrix.mysql }}" node-version: "${{ matrix.node }}" - working-directory: "." - plugin-build: "yes" + + - + name: Shutdown default MySQL + run: sudo service mysql stop + + - + name: Setup MySQL + uses: mirromutth/mysql-action@v1.1 + with: + mysql version: "${{ matrix.mysql }}" + mysql root password: "root" + + - + 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: Get Composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - + name: Cache Composer + 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:^2.4" + composer config --no-plugins allow-plugins.symfony/thanks true + 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: Require Winzou State Machine + if: "${{ matrix.state_machine_adapter == 'winzou_state_machine' }}" + run: | + composer require winzou/state-machine:^0.4 --no-update + composer require winzou/state-machine-bundle:^0.6 --no-update + + - + name: Install PHP dependencies + run: composer install --no-interaction + + - + name: Run PHPStan + run: vendor/bin/phpstan analyse -c phpstan.neon src/ + + - + name: Run ECS + run: vendor/bin/ecs + + - + name: Get Yarn cache directory + id: yarn-cache + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - + name: Cache Yarn + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json.~1.13.0.dist **/yarn.lock') }} + 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:migrations:migrate -vvv) + + - + name: Prepare test application assets + run: | + (cd tests/Application && bin/console assets:install public -vvv) + (cd tests/Application && yarn 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 diff --git a/.github/workflows/coding_standard.yml b/.github/workflows/coding_standard.yml deleted file mode 100644 index ac6ee615..00000000 --- a/.github/workflows/coding_standard.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Coding standard - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: ~ - release: - types: [ created ] - workflow_dispatch: ~ - -jobs: - tests: - runs-on: ubuntu-latest - - name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}" - - strategy: - fail-fast: false - matrix: - php: [ "8.1", "8.2", "8.3" ] - symfony: [ "^5.4", "^6.4" ] - sylius: [ "^1.13", "^1.14" ] - node: [ "18.x", "20.x" ] - - steps: - - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: "${{ matrix.php }}" - extensions: intl - tools: symfony - coverage: none - - - name: Get Composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache Composer - 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 install --no-interaction - env: - SYMFONY_REQUIRE: ${{ matrix.symfony }} - - - name: Run PHPStan - run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/ - - - name: Run ECS - run: vendor/bin/ecs - - - name: Failed build Slack notification - uses: rtCamp/action-slack-notify@v2 - if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }} - env: - SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }} - SLACK_COLOR: ${{ job.status }} - SLACK_ICON: https://github.com/rtCamp.png?size=48 - SLACK_MESSAGE: ':x:' - SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository - SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }} - SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }} diff --git a/README.md b/README.md index 7a4c751b..edd50981 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,28 @@ -# [](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_wishlist) +
+
+
+
-
-