Skip to content

Sort Composer packages #174

Sort Composer packages

Sort Composer packages #174

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.3, 8.2, 8.1 ]
database: [ mysql, sqlite ]
release: [ stable, lowest ]
include:
- php: 8.3
release: stable
coverage: xdebug
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/cache@v3
with:
path: ~/.cache/composer/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_${{ matrix.database }}, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- run: cp tests/config/database.ci.php tests/config/database.php
- run: |
PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "")
vendor/bin/phpunit $PHPUNIT_FLAGS
env:
DATABASE: ${{ matrix.database }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
- run: php tests/coverage/scrutinizer.php
if: matrix.coverage == 'xdebug'