PHP - Checks #17
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 - Checks | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['8.1', '8.3'] | |
dependencies: [''] | |
include: | |
- { php-version: '8.1', dependencies: '--prefer-lowest --prefer-stable' } | |
name: Unit tests - PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl, zip | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update --no-interaction ${{ matrix.dependencies }} | |
- name: Run tests | |
env: | |
COLUMNS: 120 | |
run: | | |
composer tests-ci | |
codestyle: | |
name: "Code style and static analysis" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring, intl | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update --no-interaction --no-progress | |
- name: Run lints | |
run: composer lint | |
- name: Run checks | |
run: composer analyze |