Skip to content

Commit

Permalink
Tweak CI
Browse files Browse the repository at this point in the history
  • Loading branch information
HypeMC committed Sep 28, 2021
1 parent 7d8dc50 commit b65b325
Showing 1 changed file with 15 additions and 31 deletions.
46 changes: 15 additions & 31 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,10 @@ jobs:
php-version: '7.4'
tools: phpstan

- 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.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist
uses: ramsey/composer-install@v1
with:
composer-options: '--prefer-dist'

- name: Install PHPUnit dependencies
run: vendor/bin/simple-phpunit install
Expand All @@ -62,37 +53,29 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ '7.2', '7.3', '7.4', '8.0' ]
symfony-versions: [ '4.4', '5.2', '5.3' ]
composer-prefer: [ '', '--prefer-stable --prefer-lowest' ]
php: [ '7.2', '7.3', '7.4', '8.0' ]
symfony: [ '4.4', '5.2', '5.3' ]
dependencies: [ 'highest', 'lowest' ]
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-versions }}.*
SYMFONY_PHPUNIT_VERSION: ${{ matrix.php-versions >= 7.4 && '9.5' || '8.5' }}
name: PHP ${{ matrix.php-versions }} and Symfony ${{ matrix.symfony-versions }} Test
SYMFONY_REQUIRE: ${{ matrix.symfony }}.*
SYMFONY_PHPUNIT_VERSION: ${{ matrix.php >= 7.4 && '9.5' || '8.5' }}
name: PHP ${{ matrix.php }} & Symfony ${{ matrix.symfony }}${{ matrix.dependencies == 'lowest' && ' (lowest)' || '' }} Test
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ matrix.php }}
ini-values: zend.exception_ignore_args=false
tools: flex

- 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.json') }}-${{ matrix.composer-prefer }}-
restore-keys: ${{ runner.os }}-composer-${{ matrix.composer-prefer }}-

- name: Install dependencies
run: composer update --prefer-dist ${{ matrix.composer-prefer }}
uses: ramsey/composer-install@v1
with:
composer-options: '--prefer-dist'
dependency-versions: ${{ matrix.dependencies }}

- name: Install PHPUnit dependencies
run: vendor/bin/simple-phpunit install
Expand All @@ -105,3 +88,4 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: coverage.xml
flags: ${{ matrix.php }}

0 comments on commit b65b325

Please sign in to comment.