@@ -6,10 +6,11 @@ name: build
66
77jobs :
88 tests :
9- name : PHP ${{ matrix.php-version }}-${{ matrix.os }}
9+ name : PHP ${{ matrix.php }}-${{ matrix.os }}
10+
1011 runs-on : ${{ matrix.os }}
12+
1113 env :
12- extensions : curl, mbstring, dom
1314 key : cache-v1
1415
1516 strategy :
@@ -18,19 +19,18 @@ jobs:
1819 - ubuntu-latest
1920 - windows-latest
2021
21- php-version :
22+ php :
2223 - " 7.4"
2324 - " 8.0"
2425
2526 steps :
2627 - name : Checkout
27- uses : actions/checkout@v2.3.4
28+ uses : actions/checkout@v2
2829
2930 - name : Install PHP
3031 uses : shivammathur/setup-php@v2
3132 with :
32- php-version : ${{ matrix.php-version }}
33- extensions : ${{ env.extensions }}
33+ php-version : ${{ matrix.php }}
3434 ini-values : date.timezone='UTC'
3535 tools : composer:v2
3636 coverage : pcov
@@ -44,38 +44,18 @@ jobs:
4444 run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4545
4646 - name : Cache dependencies installed with composer
47- uses : actions/cache@v1
47+ uses : actions/cache@v2
4848 with :
4949 path : ${{ env.COMPOSER_CACHE_DIR }}
50- key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
50+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
5151 restore-keys : |
52- php${{ matrix.php-version }}-composer-
52+ php${{ matrix.php }}-composer-
5353
5454 - name : Update composer
5555 run : composer self-update
5656
57- - name : Install dependencies with composer php 7.4
58- if : matrix.php-version == '7.4'
59- run : composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader
60-
61- - name : Install dependencies with composer php 8.0
62- if : matrix.php-version == '8.0'
63- run : composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader
64-
65- - name : PHPUnit run with coverage on Linux PHP 7.4
66- if : matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4'
67- run : vendor/bin/phpunit --coverage-clover=coverage.clover
68-
69- - name : PHPUnit run without coverage on Linux PHP 8.0
70- if : matrix.os == 'ubuntu-latest' && matrix.php-version == '8.0'
71- run : vendor/bin/phpunit
72-
73- - name : PHPUnit run without coverage on Windows
74- if : matrix.os == 'windows-latest'
75- run : vendor/bin/phpunit
57+ - name : Install dependencies with composer
58+ run : composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
7659
77- - name : Code coverage scrutinizer on Linux PHP 7.4
78- if : matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4'
79- run : |
80- wget https://scrutinizer-ci.com/ocular.phar
81- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
60+ - name : Run tests with phpunit
61+ run : vendor/bin/phpunit --colors=always
0 commit comments