Deprecate LazyListenerFactory #25
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: Unit test | |
on: | |
- push | |
- pull_request | |
env: | |
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" | |
jobs: | |
tests: | |
name: "PhpUnit" | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
experimental: | |
- false | |
include: | |
- php-version: "8.2" | |
composer-options: "--ignore-platform-reqs" | |
experimental: true | |
steps: | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: "Install latest dependencies" | |
run: "composer update ${{ env.COMPOSER_FLAGS }} ${{ matrix.composer-options }}" | |
- name: "Run tests" | |
run: ./vendor/bin/phpunit -c phpunit.xml.dist | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: '7.4' | |
coverage: xdebug | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: "Install latest dependencies" | |
run: "composer update ${{ env.COMPOSER_FLAGS }}" | |
- name: "Run tests with coverage" | |
run: ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist | |
- name: Upload coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls --coverage_clover=build/logs/clover.xml -v |