Skip to content

Cake 5

Cake 5 #111

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
testsuite:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2']
prefer-lowest: ['']
include:
- php-version: '8.1'
prefer-lowest: 'prefer-lowest'
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
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: Composer install
run: |
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
composer update --prefer-lowest --prefer-stable
elif ${{ matrix.php-version == '8.2' }}; then
composer update --ignore-platform-req=php
else
composer update
fi
- name: Setup problem matchers for PHPUnit
if: matrix.php-version == '8.1'
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
continue-on-error: ${{ matrix.prefer-lowest == 'prefer-lowest' }}
- 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-20.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:4.23, phpstan:1.7
- name: Composer Install
run: composer install
- name: Run phpcs
run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr
- name: Run psalm
if: always()
run: psalm --output-format=github
- name: Run phpstan
if: always()
run: phpstan analyse