Skip to content

Cake5

Cake5 #14

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
testsuite:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
php-version: ['7.2', '7.4']
prefer-lowest: ['']
include:
- php-version: '7.2'
prefer-lowest: 'prefer-lowest'
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
coverage: pcov
- name: Composer install
run: |
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
composer update --prefer-lowest --prefer-stable
else
composer install
fi
- name: Run PHPUnit
run: |
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
vendor/bin/phpunit --coverage-clover=coverage.xml
else
vendor/bin/phpunit
fi
- name: Code Coverage Report
if: success() && matrix.php-version == '7.4'
uses: codecov/codecov-action@v1
cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extension: mbstring, intl
coverage: none
tools: cs2pr, phpstan:^0.12
- name: Composer Install
run: composer install
- name: Run phpcs
run: vendor/bin/phpcs --report=checkstyle --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/ | cs2pr
- name: Run phpstan
if: success() || failure()
run: phpstan analyse