use supported versions during github actions #24
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
# .github/workflows/code_checks.yaml | |
name: code check | |
on: | |
pull_request: null | |
push: | |
branches: | |
- master | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['8.1', '8.2'] | |
name: PHP ${{ matrix.php }} tests | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
- name: Download dependencies | |
run: composer update --no-ansi --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest | |
- name: Run tests | |
run: ./vendor/bin/phpunit -c phpunit.xml | |
- name: Static analysis for source | |
run: ./vendor/bin/phpstan analyse -l max src | |
- name: Static analysis for tests | |
run: ./vendor/bin/phpstan analyse -l max test | |
- name: Code Style | |
run: ./vendor/bin/php-cs-fixer fix --dry-run --verbose --config .php-cs-fixer.dist.php ./src ./test |