Skip to content

build

build #17

Workflow file for this run

name: build
on:
push: ~
pull_request: ~
schedule:
- cron: 5 8 * * 2
env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=5.7"
jobs:
checks:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['8.0']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run mysql server
run: sudo /etc/init.d/mysql start
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl
coverage: none
- name: Install Composer dependencies
run: composer update --no-progress --no-suggest --prefer-dist --no-interaction
- name: Validate composer
run: composer validate --strict
- 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: Lint container
run: (cd tests/Application && bin/console lint:container --env dev)
- name: Setup database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
- name: Install JS dependencies
run: (cd tests/Application && yarn install)
- name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn build:prod)
- name: Run behat
run: vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun