Merge pull request #328 from FriendsOfCake/cake5 #74
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: | |
- '*' | |
permissions: | |
contents: read | |
jobs: | |
testsuite: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.1', '8.2'] | |
prefer-lowest: [''] | |
include: | |
- php-version: '8.1' | |
prefer-lowest: 'prefer-lowest' | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: | | |
if [[ ${{ matrix.php-version }} == '8.1' ]]; then | |
vendor/bin/phpunit --coverage-clover=coverage.xml | |
else | |
vendor/bin/phpunit | |
fi | |
- name: Code Coverage Report | |
if: matrix.php-version == '8.1' | |
uses: codecov/codecov-action@v3 | |
cs-stan: | |
uses: cakephp/.github/.github/workflows/[email protected] | |
secrets: inherit |