-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update: synced local '.github/workflows/phpcs.yml' with remote 'workf…
…lows/phpcs-default.yml'
- Loading branch information
amiabot
committed
Nov 16, 2023
1 parent
58628d7
commit 5856bfe
Showing
1 changed file
with
14 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: PHP_CodeSniffer | ||
name: PHPCS (Default) | ||
|
||
on: pull_request | ||
|
||
|
@@ -7,30 +7,30 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
php-version: '8.2' | ||
coverage: none | ||
tools: composer, cs2pr | ||
|
||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Setup cache | ||
uses: pat-s/[email protected] | ||
- name: Cache Composer | ||
id: cache-composer | ||
run: | | ||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
# Use the hash of composer.json as the key for your cache if you do not commit composer.lock. | ||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
path: ${{ steps.cache-composer.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-suggest --no-progress | ||
run: | | ||
composer config github-oauth.github.com ${{ secrets.AMIABOT_BOT_TOKEN }} | ||
composer install --prefer-dist --no-progress | ||
- name: Detect coding standard violations | ||
run: vendor/bin/phpcs -q --report=checkstyle . | cs2pr --notices-as-warnings |