Skip to content

Add github actions config file #2

Add github actions config file

Add github actions config file #2

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Run PHPStan
run: composer phpstan
- name: Run PHPCS
run: composer phpcs
phpunit:
name: PHPUnit (PHP ${{ matrix.php }} + ORM ${{ matrix.orm }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']
orm: ['4', '5']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- name: Install dependencies
run: composer install --prefer-dist --no-interaction
- name: Require ORM version
run: composer require "cakephp/orm:^${{ matrix.orm }}" "cakephp/database:^${{ matrix.orm }}" --no-interaction --no-update
- name: Update dependencies
run: composer update --prefer-dist --no-interaction
- name: Run PHPUnit
run: composer phpunit