Add php cs fixer run to CI #36
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: PHPUnit | |
on: | |
push: | |
branches: [ release ] | |
pull_request: | |
branches: [ release ] | |
jobs: | |
test: | |
name: Testing on PHP ${{ matrix.php-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1 | |
coverage: pcov | |
- name: Get Composer Cache Directory | |
id: composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run test suite | |
run: composer run-script test | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Coverage report | |
path: coverage | |
- name: Lint via PHP CS Fixer | |
run: composer run-script lint:ci |