Fixed readme composer usage #42
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
on: | |
- pull_request | |
- push | |
name: CI | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
php: | |
- "8.0" | |
- "8.1" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: pcov | |
ini-values: assert.exception=1, zend.assertions=1 | |
- name: Install composer dependencies ignoring platform requirements | |
if: matrix.php == '8.0' | |
run: composer install --no-ansi --no-interaction --no-progress --no-suggest --ignore-platform-reqs | |
- name: Install composer dependencies | |
if: matrix.php != '8.0' | |
run: composer update --no-ansi --no-interaction --no-progress --no-suggest | |
- name: Run tests with phpunit | |
run: vendor/bin/phpunit --coverage-clover=coverage.xml | |
- name: Send code coverage report to Codecov.io | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |