Skip to content

Commit

Permalink
Update: synced local '.github/workflows/phpcs.yml' with remote 'workf…
Browse files Browse the repository at this point in the history
…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.
28 changes: 14 additions & 14 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHP_CodeSniffer
name: PHPCS (Default)

on: pull_request

Expand All @@ -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

0 comments on commit 5856bfe

Please sign in to comment.