3.0.1 release #521
Workflow file for this run
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: | |
pull_request: | |
push: | |
jobs: | |
test: | |
name: "PHPUnit PHP ${{ matrix.php }}" | |
strategy: | |
matrix: | |
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ] | |
include: | |
- php: '7.4' | |
coverage: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring | |
tools: composer, cs2pr | |
coverage: pcov | |
- uses: actions/checkout@v2 | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer-cache-php${{ matrix.php }} | |
- name: Composer install | |
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader | |
- name: Enable code coverage | |
if: matrix.coverage | |
run: echo "COVERAGE=1" >> $GITHUB_ENV | |
- name: PHPUnit | |
run: | | |
mkdir -p build/logs/phpunit | |
if [ "$COVERAGE" = '1' ]; then | |
vendor/bin/phpunit --coverage-clover build/logs/phpunit/clover.xml --log-junit build/logs/phpunit/junit.xml --colors=always | |
else | |
vendor/bin/phpunit --log-junit build/logs/phpunit/junit.xml --colors=always | |
fi | |
- name: Upload coverage results to Codecov | |
if: matrix.coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
name: phpunit-php${{ matrix.php }} | |
flags: phpunit | |
fail_ci_if_error: true | |
continue-on-error: true | |
static-analysis: | |
name: "Static Analysis" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring | |
tools: composer, cs2pr | |
- uses: actions/checkout@v2 | |
- name: Cache Composer cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache | |
key: composer-cache-php7.4 | |
- name: Composer install | |
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader | |
- name: Psalm | |
run: php vendor/bin/psalm --threads=2 --output-format=github --shepherd --stats | |
- name: PHPStan | |
run: php vendor/bin/phpstan analyse --error-format=checkstyle --no-progress src/ tests/ | cs2pr |