CakePHP 5 compatibility #63
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
testsuite: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2'] | |
prefer-lowest: [''] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl | |
coverage: pcov | |
- name: Install packages | |
run: | | |
sudo apt install xfonts-base xfonts-75dpi | |
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb | |
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb | |
sudo apt install -f | |
wkhtmltopdf --version | |
- name: Composer install | |
run: | | |
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then | |
composer update --prefer-lowest --prefer-stable | |
else | |
composer install | |
fi | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Run PHPUnit | |
run: | | |
vendor/bin/phpunit | |
- name: Code Coverage Report | |
if: matrix.php-version == '8.1' | |
uses: codecov/codecov-action@v3 | |
cs-stan: | |
name: Coding Standard & Static Analysis | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring, intl | |
coverage: none | |
tools: cs2pr, vimeo/psalm:5.15, phpstan:1.10 | |
- name: Composer Install | |
run: composer install | |
- name: Run phpcs | |
run: vendor/bin/phpcs -q --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr | |
- name: Run psalm | |
if: success() || failure() | |
run: psalm --output-format=github | |
- name: Run phpstan | |
if: success() || failure() | |
run: phpstan analyse |