Skip to content

Fixed composer requirements #16

Fixed composer requirements

Fixed composer requirements #16

name: "Continuous Integration"
on: [ push, pull_request ]
jobs:
code-style:
name: Code style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run php-cs-fixer
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run --using-cache=no --verbose
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run vimeo/psalm
run: rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml --shepherd
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run phpstan/phpstan
run: ./vendor/bin/phpstan analyse src --level 9
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
env:
PHP_EXTENSIONS: dom, json, mbstring, curl, tokenizer
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Override PHP ini values for JIT compiler
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
tools: composer:v2
- name: Install dependencies
run: composer update --no-ansi --no-interaction --no-progress
- name: Run tests with phpunit
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-clover=coverage.xml
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
files: ./coverage.xml