1
- name : CI
1
+ name : Continuous Integration
2
2
3
3
on :
4
4
pull_request : null
9
9
- 3.5.x
10
10
11
11
jobs :
12
- Tests :
12
+ tests :
13
+ name : Tests
13
14
runs-on : ubuntu-latest
14
- continue-on-error : ${{ matrix.experimental == true }}
15
15
env :
16
- SYMFONY_REQUIRE : ${{matrix.symfony_constraint }}
16
+ SYMFONY_REQUIRE : ${{ matrix.symfony-version }}
17
17
strategy :
18
18
fail-fast : false
19
19
matrix :
20
20
php :
21
- - ' 8.1'
22
- - ' 8.0'
23
- - ' 7.4'
24
- - ' 7.3'
25
21
- ' 7.2'
26
- sentry_constraint : [false]
27
- dbal_constraint : [false]
28
- symfony_constraint : ['']
29
- experimental : [false]
22
+ - ' 7.3'
23
+ - ' 7.4'
24
+ - ' 8.0'
25
+ - ' 8.1'
26
+ symfony-version :
27
+ - 3.4.*
28
+ - 4.4.*
29
+ - 5.*
30
+ dependencies :
31
+ - highest
32
+ exclude :
33
+ - php : ' 8.0'
34
+ symfony-version : 3.4.*
35
+ - php : ' 8.1'
36
+ symfony-version : 3.4.*
30
37
include :
31
- # - description: 'sentry/sentry dev-develop'
32
- # php: '7.4'
33
- # sentry_constraint: 'dev-develop'
34
- # experimental: true
35
- - description : ' DBAL 2'
36
- php : ' 7.4'
37
- dbal_constraint : ' ^2.13'
38
- - description : ' Symfony 4.4'
39
- php : ' 7.3'
40
- symfony_constraint : 4.4.*
41
- - description : ' Symfony 3.4'
42
- php : ' 7.2'
43
- symfony_constraint : 3.4.*
44
- env :
45
- SYMFONY_DEPRECATIONS_HELPER : disabled
46
- - description : ' prefer lowest'
47
- php : ' 7.2'
48
- composer_option : ' --prefer-lowest'
49
- symfony_constraint : ^3.4.44
50
- env :
51
- SYMFONY_DEPRECATIONS_HELPER : disabled
52
-
53
- name : PHP ${{ matrix.php }} tests (${{ matrix.description }})
38
+ - php : ' 7.2'
39
+ symfony-version : 3.4.*
40
+ dependencies : lowest
41
+ - php : ' 7.2'
42
+ symfony-version : 4.4.*
43
+ dependencies : lowest
44
+ - php : ' 7.2'
45
+ symfony-version : 5.*
46
+ dependencies : lowest
47
+
54
48
steps :
55
- - uses : actions/checkout@v2
49
+ - name : Checkout
50
+ uses : actions/checkout@v2
56
51
with :
57
52
fetch-depth : 2
58
- - uses : actions/cache@v2
59
- with :
60
- path : ~/.composer/cache/files
61
- key : ${{ matrix.php }}-${{ matrix.symfony_constraint }}-${{ matrix.composer_option }}
62
- - uses : shivammathur/setup-php@v2
53
+
54
+ - name : Setup PHP
55
+ uses : shivammathur/setup-php@v2
63
56
with :
64
57
php-version : ${{ matrix.php }}
65
- coverage : xdebug
66
- - name : Install Symfony Flex
67
- run : composer global require --no-progress --no-scripts --no-plugins symfony/flex
68
- - run : composer remove --dev symfony/messenger --no-update
69
- if : matrix.symfony_constraint == '3.4.*' || matrix.composer_option == '--prefer-lowest'
70
- - run : composer require --dev doctrine/dbal ${{ matrix.dbal_constraint }} --no-update
71
- if : matrix.dbal_constraint
72
- - run : composer update --no-progress --ansi ${{ matrix.composer_option }}
73
- - run : composer require sentry/sentry dev-develop
74
- if : matrix.sentry_constraint == 'dev-develop'
75
- - run : vendor/bin/phpunit --coverage-clover=coverage.xml
76
- - uses : codecov/codecov-action @v1
58
+ coverage : pcov
59
+ tools : flex
60
+
61
+ - name : Setup Problem Matchers for PHPUnit
62
+ run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
63
+
64
+ - name : Remove Symfony Messenger
65
+ run : composer remove --dev symfony/messenger --no-update
66
+ if : matrix.symfony-version == '3.4.*'
67
+
68
+ - name : Install dependencies
69
+ uses : ramsey/composer-install @v1
77
70
with :
78
- file : ' ./coverage.xml'
79
- fail_ci_if_error : true
71
+ dependency-versions : ${{ matrix.dependencies }}
72
+ composer-options : --prefer-dist
73
+
74
+ - name : Run tests
75
+ run : vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
76
+
77
+ - name : Upload code coverage
78
+ uses : codecov/codecov-action@v1
79
+ with :
80
+ file : build/coverage-report.xml
80
81
81
82
missing-optional-packages-tests :
82
83
name : Tests without optional packages
83
84
runs-on : ubuntu-latest
84
85
strategy :
85
86
fail-fast : false
86
87
matrix :
87
- php :
88
- - ' 7.2'
89
- - ' 8.0'
90
- dependencies :
91
- - lowest
92
- - highest
88
+ include :
89
+ - php : ' 7.2'
90
+ dependencies : lowest
91
+ - php : ' 7.4'
92
+ dependencies : highest
93
+ - php : ' 8.0'
94
+ dependencies : lowest
95
+ - php : ' 8.1'
96
+ dependencies : highest
93
97
94
98
steps :
95
99
- name : Checkout
@@ -104,27 +108,14 @@ jobs:
104
108
- name : Setup Problem Matchers for PHPUnit
105
109
run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
106
110
107
- - name : Determine Composer cache directory
108
- id : composer-cache
109
- run : echo "::set-output name=directory::$(composer config cache-dir)"
110
-
111
- - name : Cache Composer dependencies
112
- uses : actions/cache@v2
113
- with :
114
- path : ${{ steps.composer-cache.outputs.directory }}
115
- key : ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
116
- restore-keys : ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-
117
-
118
111
- name : Remove optional packages
119
112
run : composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache --dev --no-update
120
113
121
- - name : Install highest dependencies
122
- run : composer update --no-progress --no-interaction --prefer-dist
123
- if : ${{ matrix.dependencies == 'highest' }}
124
-
125
- - name : Install lowest dependencies
126
- run : composer update --no-progress --no-interaction --prefer-dist --prefer-lowest
127
- if : ${{ matrix.dependencies == 'lowest' }}
114
+ - name : Install dependencies
115
+ uses : ramsey/composer-install@v1
116
+ with :
117
+ dependency-versions : ${{ matrix.dependencies }}
118
+ composer-options : --prefer-dist
128
119
129
120
- name : Run tests
130
121
run : vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
0 commit comments