mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-20 10:03:43 +03:00
Only run linter on changed files
This commit is contained in:
parent
110a3b54db
commit
6844c58b44
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -14,6 +14,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get Composer cache directory
|
||||
id: composer-cache
|
||||
|
@ -42,7 +44,10 @@ jobs:
|
|||
echo "${PWD}/vendor/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run PHPCS on all Core files
|
||||
run: composer run-script phpcs -- -n | cs2pr
|
||||
run: |
|
||||
touch $GITHUB_WORKSPACE/tmp.php
|
||||
export CHANGED_FILES=$(git diff --name-only --diff-filter=AM ${{ github.base_ref }} | tr '\n' ' ')
|
||||
composer run-script phpcs $GITHUB_WORKSPACE/tmp.php $(echo $CHANGED_FILES) -- -n | cs2pr
|
||||
|
||||
phpunit:
|
||||
name: PHP Unit Tests
|
||||
|
|
Loading…
Reference in a new issue