Merge pull request #145 from stof/fix_compat #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
check_composer: | |
name: Check composer.json | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: '8.2' | |
- run: composer validate --strict --no-check-lock | |
coding_standards: | |
name: Coding standards | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: '8.2' | |
- name: Install dependencies | |
run: composer update --ansi --no-progress --prefer-dist --no-interaction | |
- run: composer phpcs | |
tests: | |
name: "Tests on PHP ${{ matrix.php }}${{ matrix.name_suffix }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '5.6', '7.0', '7.1', '7.4', '8.0', '8.1', '8.2' ] | |
min_stability: [ '' ] | |
name_suffix: [ '' ] | |
composer_flags: [ '' ] | |
include: | |
- php: '8.2' | |
min_stability: 'dev' | |
name_suffix: ' (dev deps)' | |
- php: '5.6' | |
min_stability: '' | |
name_suffix: ' (lowest deps)' | |
composer_flags: '--prefer-lowest' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: "${{ matrix.php }}" | |
- name: Configure stability | |
if: "matrix.min_stability != ''" | |
run: composer config minimum-stability "${{ matrix.min_stability }}" | |
- name: Install dependencies | |
run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }} | |
- name: Run tests | |
run: vendor/bin/phpunit -v --colors=always |