-
Notifications
You must be signed in to change notification settings - Fork 37
63 lines (51 loc) · 1.81 KB
/
tests.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
name: Tests
on:
push:
pull_request:
jobs:
unit-tests:
name: PHPUnit
runs-on: ubuntu-latest
env:
extensions: intl, xdebug
strategy:
matrix:
include:
- php: '7.3'
symfony: '4.4'
composer_flags: --prefer-lowest
- php: '7.4'
symfony: '4.4'
composer_flags: --prefer-stable
- php: '8.0'
symfony: '4.4'
composer_flags: --prefer-stable
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
extensions: "${{ env.extensions }}"
ini-values: date.timezone=Europe/London,memory_limit=-1,error_reporting=-1,log_errors_max_len=0,zend.assertions=1,assert.exception=1,xdebug.show_exception_trace=0
php-version: "${{ matrix.php }}"
tools: composer, phpunit:9
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Composer require Symfony ${{ matrix.symfony }}
run: SYMFONY_REQUIRE=${{ matrix.symfony }} composer update --no-interaction --no-progress --prefer-dist --verbose
- name: Composer install
run: composer install --no-interaction --no-progress --prefer-dist --verbose
- name: PHP environment details
run: php -v
- name: PHPUnit Unit and Functional tests
run: XDEBUG_MODE=coverage phpunit --coverage-text