mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Code Quality
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '1.1'
|
|
- 'develop'
|
|
|
|
jobs:
|
|
codeQuality:
|
|
runs-on: ubuntu-latest
|
|
name: PHP
|
|
steps:
|
|
- name: Cancel previous incomplete runs
|
|
uses: styfle/cancel-workflow-action@0.8.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
|
|
- name: Checkout changes
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 7.2
|
|
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer install --no-interaction --no-progress
|
|
|
|
- name: Reset Winter modules and library
|
|
run: |
|
|
git reset --hard HEAD
|
|
rm -rf ./vendor/winter/storm
|
|
wget https://github.com/wintercms/storm/archive/develop.zip -O ./vendor/winter/develop.zip
|
|
unzip ./vendor/winter/develop.zip -d ./vendor/winter
|
|
mv ./vendor/winter/storm-develop ./vendor/winter/storm
|
|
composer dump-autoload
|
|
|
|
- name: Run code quality checks
|
|
run: |
|
|
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
|
|
./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} HEAD) |