|
| 1 | +name: build |
| 2 | +on: |
| 3 | + push: ~ |
| 4 | + pull_request: ~ |
| 5 | + schedule: |
| 6 | + - cron: 5 8 * * 3 |
| 7 | +jobs: |
| 8 | + checks: |
| 9 | + name: PHP ${{ matrix.php-versions }} |
| 10 | + runs-on: ${{ matrix.operating-system }} |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + operating-system: [ubuntu-latest] |
| 15 | + php-versions: ['7.2', '7.3'] |
| 16 | + steps: |
| 17 | + - name: Set environment variables |
| 18 | + run: | |
| 19 | + echo "::set-env name=APP_ENV::test" |
| 20 | + echo "::set-env name=DATABASE_URL::mysql://root:root@127.0.0.1/sylius?serverVersion=5.7" |
| 21 | + - name: Checkout |
| 22 | + uses: actions/checkout@v1 |
| 23 | + - name: Setup PHP, with composer and extensions |
| 24 | + uses: shivammathur/setup-php@master |
| 25 | + with: |
| 26 | + php-version: ${{ matrix.php-versions }} |
| 27 | + extensions: intl |
| 28 | + - name: Install Composer dependencies |
| 29 | + run: composer update --no-progress --no-suggest --prefer-dist --no-interaction |
| 30 | + - name: Validate composer |
| 31 | + run: composer validate --strict |
| 32 | + - name: Check composer normalized |
| 33 | + run: composer normalize --dry-run |
| 34 | + - name: Check style |
| 35 | + run: composer check-style |
| 36 | + - name: Static analysis |
| 37 | + run: composer analyse |
| 38 | + - name: Run phpspec |
| 39 | + run: composer phpspec |
| 40 | + - name: Run phpunit |
| 41 | + run: composer phpunit |
| 42 | + - name: Setup database, assets and cache |
| 43 | + run: | |
| 44 | + (cd tests/Application && bin/console doctrine:database:create -vvv) |
| 45 | + (cd tests/Application && bin/console doctrine:schema:create -vvv) |
| 46 | + (cd tests/Application && bin/console assets:install public -vvv) |
| 47 | + (cd tests/Application && bin/console cache:warmup -vvv) |
| 48 | + - name: Run behat |
| 49 | + run: vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun |
0 commit comments