File tree Expand file tree Collapse file tree 4 files changed +82
-55
lines changed Expand file tree Collapse file tree 4 files changed +82
-55
lines changed Original file line number Diff line number Diff line change
1
+ name : Tests
2
+ on : [ pull_request ]
3
+
4
+ jobs :
5
+ tests :
6
+ name : PHPUnit PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }})
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ php :
11
+ - ' 7.1'
12
+ - ' 7.2'
13
+ - ' 7.3'
14
+ - ' 7.4'
15
+ - ' 8.0'
16
+ dependency :
17
+ - ' '
18
+ symfony :
19
+ - ' 4.4.*'
20
+ - ' 5.3.*'
21
+ include :
22
+ - php : ' 7.1'
23
+ symfony : ' 4.4.*'
24
+ dependency : ' lowest'
25
+ - php : ' 8.0'
26
+ symfony : ' 6.0.*'
27
+ exclude :
28
+ - php : ' 7.1'
29
+ symfony : ' 5.3.*'
30
+ fail-fast : false
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v2
34
+
35
+ - name : Setup PHP
36
+ uses : shivammathur/setup-php@v2
37
+ with :
38
+ php-version : ${{ matrix.php }}
39
+ extensions : pcov
40
+ tools : flex
41
+
42
+ - name : Prefer unstable Composer dependencies for Symfony 6.0
43
+ if : matrix.symfony == '6.0.*'
44
+ run : |
45
+ composer config prefer-stable false
46
+ composer config minimum-stability dev
47
+
48
+ - name : Get Composer Cache Directory
49
+ id : composer-cache
50
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
51
+
52
+ - name : Cache dependencies
53
+ uses : actions/cache@v2
54
+ with :
55
+ path : ${{ steps.composer-cache.outputs.dir }}
56
+ key : ${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
57
+ restore-keys : ${{ matrix.php }}-composer-
58
+
59
+ - name : Update project dependencies
60
+ if : matrix.dependency == ''
61
+ run : composer update --no-progress --ansi --prefer-stable
62
+ env :
63
+ SYMFONY_REQUIRE : ${{ matrix.symfony }}
64
+
65
+ - name : Update project dependencies lowest
66
+ if : matrix.dependency == 'lowest'
67
+ run : composer update --no-progress --ansi --prefer-stable --prefer-lowest
68
+ env :
69
+ SYMFONY_REQUIRE : ${{ matrix.symfony }}
70
+
71
+ - name : Validate composer
72
+ run : composer validate --strict --no-check-lock
73
+
74
+ - name : Run tests
75
+ run : vendor/bin/phpunit
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -62,7 +62,12 @@ public function it_can_assert_that_a_configuration_is_valid()
62
62
public function it_fails_when_a_configuration_is_invalid_when_it_should_have_been_valid ()
63
63
{
64
64
$ this ->expectException (ExpectationFailedException::class);
65
- $ this ->expectExceptionMessage ('The child node "required_value" at path "root" must be configured. ' );
65
+
66
+ if (method_exists ($ this , 'expectExceptionMessageMatches ' )) {
67
+ $ this ->expectExceptionMessageMatches ('/^The child (config|node) "required_value" (at path|under) "root" must be configured/ ' );
68
+ } else {
69
+ $ this ->expectExceptionMessageRegExp ('/^The child (config|node) "required_value" (at path|under) "root" must be configured/ ' );
70
+ }
66
71
67
72
$ this ->assertConfigurationIsValid (
68
73
[
Original file line number Diff line number Diff line change 14
14
],
15
15
"require" : {
16
16
"php" : " ^7.1 || ^8.0" ,
17
- "symfony/config" : " ^2.7 || ^3. 4 || ^4.0 || ^5 .0"
17
+ "symfony/config" : " ^4. 4 || ^5.3 || ^6 .0"
18
18
},
19
19
"require-dev" : {
20
20
"phpunit/phpunit" : " ^7.0 || ^8.0 || ^9.0"
You can’t perform that action at this time.
0 commit comments