1- name : PHP Composer
1+ name : Tests
22
33on :
44 push :
77 branches : [ master ]
88
99jobs :
10- build :
11-
10+ phpunit :
11+ name : Tests
1212 strategy :
1313 fail-fast : false
1414 matrix :
15- # os: [ubuntu-latest, macos-latest, windows-latest]
1615 os : [ubuntu-latest]
17- php : ['7.1', '7.2', '7.3', '7.4', '8.0']
18- # max 4.4.16, see https://github.com/symfony/symfony/issues/39521
19- # max 5.1.8, see https://github.com/symfony/symfony/issues/39521
20- yaml : ['5.2.9', '5.1.11', '4.4.24', '^3.4']
16+ php :
17+ - " 7.1"
18+ - " 7.2"
19+ - " 7.3"
20+ - " 7.4"
21+ - " 8.0"
22+ dependencies :
23+ - " lowest"
24+ - " highest"
25+ symfony-yaml : ['^3.4', '^4', '^5']
26+ include :
27+ - os : " windows-latest"
28+ php : " 8.0"
29+ dependencies : " highest"
30+ symfony-yaml : ' 5.4.2'
31+ - os : " macos-latest"
32+ php : " 8.0"
33+ dependencies : " highest"
34+ symfony-yaml : ' ^5'
2135 exclude :
22- # Symfony YAML does not run on PHP 7.1
36+ # symfony/yaml v5 does not run on PHP 7.1
2337 - php : ' 7.1'
24- yaml : ' 5.1.11'
25- - php : ' 7.1'
26- yaml : ' 5.2.9'
27- include :
28- - php : ' 7.4'
29- os : windows-latest
30- yaml : ' 5.2.9'
31- - php : ' 7.4'
32- os : macos-latest
33- yaml : ' 5.2.9'
34-
38+ symfony-yaml : ' ^5'
39+ # symfony/yaml v3.4 is not compatible with PHP 8.0 but has no upper-bound, so it installs on it
40+ - php : ' 8.0'
41+ symfony-yaml : ' ^3.4'
3542
3643 runs-on : ${{ matrix.os }}
37- env :
38- YAML : ${{ matrix.yaml }}
3944
4045 steps :
4146 - uses : actions/checkout@v2
@@ -44,60 +49,22 @@ jobs:
4449 uses : shivammathur/setup-php@v2
4550 with :
4651 php-version : ${{ matrix.php }}
47- ini-values : date.timezone='UTC'
4852 coverage : pcov
4953 tools : composer:v2
5054
51- - name : Determine composer cache directory (Linux/MacOS)
52- if : matrix.os != 'windows-latest'
53- run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
54-
55- - name : Determine composer cache directory (Windows)
56- if : matrix.os == 'windows-latest'
57- run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
55+ - name : Require specific symfony/yaml version
56+ run : " composer require symfony/yaml:'${{ matrix.symfony-yaml }}' --prefer-dist --no-interaction --ansi --no-install"
5857
59- - name : Cache dependencies installed with composer
60- uses : actions/cache @v2
58+ - name : " Install dependencies with Composer "
59+ uses : " ramsey/composer-install @v2"
6160 with :
62- path : ${{ env.COMPOSER_CACHE_DIR }}
63- key : php${{ matrix.php }}-os${{ matrix.os }}-yaml${{ matrix.yaml }}-composer-${{ hashFiles('**/composer.json') }}
64-
65-
66- - name : Validate composer.json and composer.lock
67- run : composer validate --ansi
68-
69- - name : Install dependencies (Linux/MacOS)
70- if : matrix.os != 'windows-latest'
71- run : |
72- make install
73- composer require symfony/yaml:"${YAML}" --prefer-dist --no-interaction --ansi
74-
75- - name : Install dependencies (Windows)
76- if : matrix.os == 'windows-latest'
77- run : |
78- composer install --prefer-dist --no-interaction --no-progress --ansi
79- composer require symfony/yaml:5.1.8 --prefer-dist --no-interaction --ansi
61+ dependency-versions : " ${{ matrix.dependencies }}"
8062
8163 - name : Validate test data
82- if : matrix.os == 'ubuntu-latest'
8364 run : make lint
8465
85- - name : PHP Stan analysis
86- if : matrix.os == 'ubuntu-latest'
87- run : make stan
88-
89- - name : PHPUnit tests (Linux/MacOS)
90- if : matrix.os != 'windows-latest'
66+ - name : PHPUnit tests
9167 run : make test
9268
93- - name : PHPUnit tests (Windows)
94- if : matrix.os == 'windows-latest'
95- run : vendor/bin/phpunit --colors=always
96-
97- - name : Check code style
98- if : matrix.os == 'ubuntu-latest'
99- run : make check-style
100-
10169 - name : Code coverage
102- if : matrix.os == 'ubuntu-latest'
10370 run : make coverage
0 commit comments