Pull to master by bancer #106
Workflow file for this run
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 | |
run-name: Pull to ${{ github.base_ref }} by ${{ github.actor }} | |
on: | |
pull_request: | |
branches: [master, develop, 3.x] | |
jobs: | |
Unit-Tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['5.6', '7.1', '7.2', '7.3', '7.4'] | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Setup MySQL | |
uses: shogo82148/actions-setup-mysql@v1 | |
with: | |
mysql-version: '5.6' | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
composer remove --dev phpstan/phpstan cakephp/cakephp-codesniffer overtrue/phplint --no-update | |
composer require 'cakephp/cakephp=3.10.5' 'phpunit/phpunit=5.7.0' --with-all-dependencies | |
shell: bash | |
- name: Create test database | |
run: mysql -u root -e "CREATE DATABASE cakephp_test" | |
shell: bash | |
- name: Unit Tests | |
run: ./vendor/bin/phpunit ./tests | |
PHP-Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install PHPLint | |
run: composer require --dev overtrue/phplint | |
- name: Run PHPLint | |
run: vendor/bin/phplint | |
PHPStan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: composer require 'cakephp/cakephp=3.10.5' 'phpunit/phpunit=7.0' phpstan/phpstan phpstan/phpstan-phpunit --with-all-dependencies | |
- name: PHPStan | |
run: vendor/bin/phpstan analyse --level=8 ./src ./tests | |
PHP-Code-Sniffer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 5.6 | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install PHPCS | |
run: | | |
composer remove --dev phpstan/phpstan phpunit/phpunit overtrue/phplint --no-update | |
composer require cakephp/cakephp-codesniffer | |
vendor/bin/phpcs --config-set installed_paths /home/runner/work/cakephp-filter-plugin/cakephp-filter-plugin/vendor/cakephp/cakephp-codesniffer | |
- name: Run PHPCS | |
run: vendor/bin/phpcs --colors --parallel=16 -p --standard=CakePHP --extensions=php,ctp src/ tests/ |