upgrade to sylius 1.13 #4
Workflow file for this run
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
name: build | |
on: | |
push: ~ | |
pull_request: ~ | |
schedule: | |
- cron: 5 8 * * 5 | |
env: | |
APP_ENV: test | |
DATABASE_URL: mysql://root:[email protected]/sylius?serverVersion=5.7 | |
jobs: | |
checks: | |
name: PHP ${{ matrix.php-versions }} | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.1'] | |
steps: | |
- name: Start MySQL | |
run: sudo /etc/init.d/mysql start | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: intl | |
coverage: none | |
tools: symfony | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '20.x' | |
- name: Install Composer dependencies | |
run: composer update --no-progress --no-suggest --prefer-dist --no-interaction | |
- name: Validate composer | |
run: composer validate --strict | |
- name: Check composer normalized | |
run: composer normalize --dry-run | |
- name: Check style | |
run: composer check-style | |
- name: Static analysis | |
run: composer analyse | |
- name: Run phpspec | |
run: composer phpspec | |
- name: Run phpunit | |
run: composer phpunit | |
- name: Setup database, assets and cache | |
run: | | |
(cd tests/Application && bin/console doctrine:database:create -vvv) | |
(cd tests/Application && bin/console doctrine:schema:create -vvv) | |
(cd tests/Application && bin/console assets:install public -vvv) | |
(cd tests/Application && bin/console cache:warmup -vvv) | |
- name: Run behat without javascript | |
run: vendor/bin/behat --strict -vvv --no-interaction --tags="~@javascript" || vendor/bin/behat --strict -vvv --no-interaction --tags="~@javascript" --rerun | |
########################################################################### | |
# The steps below is used to run behat with javascript. # | |
# If you don't have scenarios with javascript, you can remove these steps # | |
########################################################################### | |
- name: Install and build Yarn dependencies | |
run: | | |
(cd tests/Application && yarn install) | |
(cd tests/Application && yarn build) | |
- name: Output PHP version | |
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 & | |
sleep 15 | |
curl -s -o /dev/null -I -w "%{http_code}" http://127.0.0.1:9222/json/version | |
- name: Run webserver | |
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon) | |
- name: Run behat with javascript | |
run: vendor/bin/behat --strict -vvv --no-interaction --tags="@javascript" || vendor/bin/behat --strict -vvv --no-interaction --tags="@javascript" --rerun | |
- uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: logs | |
path: etc/build |