fix: use CI tooling as defined in Composer #54
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: PHP Tests | |
on: [push, pull_request] | |
jobs: | |
phpunit: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
name: "PHP-${{ matrix.php-versions }}: PHPUnit" | |
strategy: | |
matrix: | |
php-versions: ['7.3', '7.4'] | |
experimental: [false] | |
include: | |
- php-versions: '8.0' | |
experimental: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: redis | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Install dependencies | |
run: composer install | |
- name: Install redis | |
run: sudo apt-get install -y redis-server | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Run PHPunit | |
run: ./vendor/bin/phpunit --configuration phpunit.xml.dist | |
phpcs: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
name: "PHPCS" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
tools: cs2pr | |
- name: Install dependencies | |
run: composer install | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Run PHPCS | |
run: ./vendor/bin/phpcs -q --report=checkstyle lib | cs2pr | |
phpstan: | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
name: "PHPStan" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHPStan | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Install dependencies | |
run: composer install | |
- name: Run PHPStan | |
run: ./vendor/bin/phpstan analyse lib -l1 | |