-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 2.11 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: build
on:
push: ~
pull_request: ~
schedule:
- cron: 5 8 * * 4
env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/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: ['7.3', '7.4', '8.0']
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
- 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: Lint container
run: (cd tests/Application && bin/console lint:container)
- name: Lint yaml files
run: (cd tests/Application && bin/console lint:yaml ../../src/Resources)
- name: Lint twig files
run: (cd tests/Application && bin/console lint:twig ../../src/Resources)
- 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)