Introduce Namespaces (#56) #2
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 }} | |
tools: phpunit:5 | |
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: 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 PHPCS | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
tools: cs2pr, phpcs | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Run PHPCS | |
run: 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' | |
tools: phpstan | |
- 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: phpstan analyse lib -l1 | |