2024/01 #54
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: QA | |
on: [push] | |
jobs: | |
analysis: | |
name: analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.4" | |
tools: phpcs:3.11, php-cs-fixer:3.65, phpstan:2.0.3 | |
coverage: none | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install composer dependencies | |
run: composer install --no-progress --prefer-dist --no-dev | |
- name: Check coding style with phpcs | |
run: | | |
phpcs --version | |
phpcs | |
- name: Check coding style with php-cs-fixer | |
run: php-cs-fixer fix --dry-run --show-progress=dots --diff -vv | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
- name: Run static analysis | |
run: | | |
phpstan --version | |
phpstan --verbose --error-format=github | |
testrun: | |
name: run with phpunit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.4" | |
extensions: mbstring, bcmath, xdebug | |
tools: phpunit:11.4 | |
coverage: xdebug | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install composer dependencies | |
run: composer install --no-progress --prefer-dist --no-dev | |
- name: Run tests | |
run: phpunit |