-
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (61 loc) · 2.1 KB
/
symfony.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Symfony
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DATABASE_URL: sqlite:///%kernel.project_dir%/data/database.sqlite
jobs:
symfony-tests:
name: Symfony build
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.0' ]
phpunit-versions: [ 'latest' ]
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: phpunit:${{ matrix.phpunit-versions }}, php-cs-fixer, cs2pr
- uses: actions/checkout@v2
- name: Copy .env.test.local
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');"
- name: Check style
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-versions }}-
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: borales/[email protected]
with:
cmd: install
- uses: borales/[email protected]
with:
cmd: build
- name: Create Database
run: |
mkdir -p data
touch data/database.sqlite
- name: Update database schema
run: bin/console doctrine:schema:update -f
- name: Create Fixtures
run: bin/console doctrine:fixtures:load -n
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit --coverage-clover coverage.xml
- name: Upload to codecov
uses: codecov/codecov-action@v2