File tree Expand file tree Collapse file tree 1 file changed +14
-19
lines changed
Expand file tree Collapse file tree 1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change 11name : PHPCS check
22
3+ # Run the deployment only when code is committed to the branch.
34on : pull_request
45
6+ # Cancels all previous workflow runs for pull requests that have not completed.
7+ concurrency :
8+ # The concurrency group contains the workflow name and the branch name for pull requests
9+ # or the commit hash for any other events.
10+ group : ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
11+ cancel-in-progress : true
12+
513jobs :
614 phpcs :
715 name : PHPCS
@@ -17,23 +25,10 @@ jobs:
1725 coverage : none
1826 tools : composer, cs2pr
1927
20- - name : Get Composer cache directory
21- id : composer-cache
22- run : |
23- echo "::set-output name=dir::$(composer config cache-files-dir)"
24- - name : Setup cache
25- uses : pat-s/always-upload-cache@v2.1.5
26- with :
27- path : ${{ steps.composer-cache.outputs.dir }}
28- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
29- restore-keys : |
30- ${{ runner.os }}-composer-
31-
32- - name : Install dependencies
33- run : composer install --no-progress --prefer-dist --optimize-autoloader
28+ - name : Install composer dependencies
29+ run : composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress
3430
35- - name : PHPCS check
36- uses : chekalsky/phpcs-action@v1
37- with :
38- enable_warnings : true
39- phpcs_bin_path : ' ./vendor/bin/phpcs'
31+ - name : Run phpcs
32+ id : phpcs
33+ if : always()
34+ run : ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
You can’t perform that action at this time.
0 commit comments