[Tests] Sylius TestApplication #271
Workflow file for this run
This file contains hidden or 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
| name: Sylius | |
| 'on': | |
| push: | |
| branches: | |
| - develop | |
| - qa | |
| - master | |
| paths-ignore: | |
| - README.md | |
| pull_request: | |
| paths-ignore: | |
| - README.md | |
| jobs: | |
| sylius: | |
| name: 'PHPUnit-Behat (PHP ${{ matrix.php }} Sylius ${{ matrix.sylius }} Symfony ${{ matrix.symfony }})' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8.2 | |
| - 8.4 | |
| sylius: | |
| - 2.1.0 | |
| - 2.0.0 | |
| symfony: | |
| - 6.4 | |
| - 7.3 | |
| node: | |
| - 20.x | |
| env: | |
| APP_ENV: test | |
| package-name: payplug/sylius-payplug-plugin | |
| steps: | |
| - | |
| name: 'Setup PHP' | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '${{ matrix.php }}' | |
| ini-values: date.timezone=UTC | |
| extensions: intl | |
| tools: symfony | |
| coverage: none | |
| - | |
| name: 'Setup Node' | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '${{ matrix.node }}' | |
| - | |
| uses: actions/checkout@v3 | |
| - | |
| name: 'Composer - Get Cache Directory' | |
| id: composer-cache | |
| run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT' | |
| - | |
| name: 'Composer - Set cache' | |
| uses: actions/cache@v4 | |
| id: cache-composer | |
| with: | |
| path: '${{ steps.composer-cache.outputs.dir }}' | |
| key: 'php-${{ matrix.php }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}' | |
| restore-keys: 'php-${{ matrix.php }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}-composer-' | |
| - | |
| name: 'Composer - Create cache directory' | |
| run: 'mkdir -p /home/runner/.composer/cache' | |
| if: 'steps.cache-composer.outputs.cache-hit != ''true''' | |
| - | |
| name: 'Composer - Github Auth' | |
| run: 'composer config -g github-oauth.github.com ${{ github.token }}' | |
| - | |
| name: 'Yarn - Get cache directory' | |
| id: yarn-cache | |
| run: 'echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT' | |
| - | |
| name: 'Yarn - Set Cache' | |
| uses: actions/cache@v4 | |
| with: | |
| path: '${{ steps.yarn-cache.outputs.dir }}' | |
| key: 'node-${{ matrix.node }}-yarn-${{ hashFiles(''**/package.json **/yarn.lock'') }}' | |
| restore-keys: "node-${{ matrix.node }}-yarn-\n" | |
| - | |
| name: 'Install Sylius-Standard and Plugin' | |
| run: 'make install -e SYLIUS_VERSION=${{ matrix.sylius }} SYMFONY_VERSION=${{ matrix.symfony }}' | |
| - | |
| 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=''*'' https://127.0.0.1 > /dev/null 2>&1 &' | |
| - | |
| name: 'Run webserver' | |
| run: 'symfony server:start --port=8080 --daemon' | |
| id: end-of-setup-sylius | |
| - | |
| name: 'Doctrine Schema Validate - Run' | |
| run: 'vendor/bin/console doctrine:schema:validate --skip-sync' | |
| # - | |
| # name: 'Run PHPUnit' | |
| # run: 'make phpunit' | |
| # if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' | |
| # - | |
| # name: 'Configure Behat' | |
| # run: 'make behat-configure' | |
| # if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' | |
| # - | |
| # name: 'Run behat' | |
| # run: 'vendor/bin/behat --strict --no-interaction -f progress || vendor/bin/behat --strict -vvv --no-interaction --rerun' | |
| # if: 'always() && steps.end-of-setup-sylius.outcome == ''success''' | |
| - | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: logs | |
| path: ./tests/Application/etc/build | |
| services: | |
| mariadb: | |
| image: 'mariadb:10.4.11' | |
| ports: | |
| - '3306:3306' | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: true | |
| options: '--health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3' |