Skip to content

Remove the phpcpd dependency and all related functionality from code #193

Remove the phpcpd dependency and all related functionality from code

Remove the phpcpd dependency and all related functionality from code #193

Workflow file for this run

name: PHPQA CI
on:
pull_request:
push:
branches:
- master
jobs:
phpqa:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
php: [5.5]
include:
# PHP5
- { php: 5.4, areSuggestedToolsInstalled: yes }
- { php: 5.6, areSuggestedToolsInstalled: yes, allowedSecurityErrors: 1 }
# PHP7
- { php: 7.0 }
- { php: 7.1, areSuggestedToolsInstalled: yes }
- { php: 7.2, areSuggestedToolsInstalled: yes }
- { php: 7.3 }
- { php: 7.4, areSuggestedToolsInstalled: yes }
# PHP8
- { php: 8.0, areSuggestedToolsInstalled: yes }
- { php: 8.1, areSuggestedToolsInstalled: yes }
- { php: 8.2, areSuggestedToolsInstalled: yes }
stability: [prefer-stable]
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xsl, zip, json
coverage: none
# default composer.lock with symfony2 components + psalm = composer error
# https://github.com/EdgedesignCZ/phpqa/runs/1844081585?check_suite_focus=true#step:5:112
tools: ${{ (matrix.php != '7.2' && 'composer:v2') || 'composer:v1' }}
- name: Cache composer
uses: actions/cache@v2
with:
path: |
~/.composer/cache
vendor
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: "php-${{ matrix.php }}-composer-"
- name: Install dependencies
env:
PHP_VERSION: ${{ matrix.php }}
INSTALL_SUGGESTED_TOOLS: ${{ matrix.areSuggestedToolsInstalled || 'no' }}
run: |
if [[ $INSTALL_SUGGESTED_TOOLS == "yes" ]]; then
PHP_VERSION=$PHP_VERSION bin/suggested-tools.sh install;
else
composer install --no-interaction --no-progress;
fi
php tests/.phpunit/fix-typehints.php;
- name: Show versions
run: |
composer outdated --direct --all
./phpqa tools --config tests/.ci
- name: Run tests
env:
ALLOWED_SECURITY_ERRORS: ${{ matrix.allowedSecurityErrors || '' }}
run: |
vendor/phpunit/phpunit/phpunit
bin/ci.sh
ls -lAh build
- name: Upload QA files
uses: actions/upload-artifact@v2
with:
name: phpqa-${{ matrix.php }}
path: build