-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix - phpcs workflow was not working
- Loading branch information
Showing
1 changed file
with
46 additions
and
9 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,15 +1,52 @@ | ||
on: pull_request | ||
name: Inspections | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- ready_for_review | ||
|
||
# Cancel previous workflow run groups that have not completed. | ||
concurrency: | ||
# Group workflow runs by workflow name, along with the head branch ref of the pull request | ||
# or otherwise the branch or tag ref. | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
runPHPCSInspection: | ||
name: Run PHPCS inspection | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Run PHPCS inspection | ||
uses: rtCamp/action-phpcs-code-review@master | ||
env: | ||
SKIP_FOLDERS: "tests,.github" | ||
GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.0" | ||
coverage: none | ||
|
||
- name: Configure Composer cache | ||
uses: actions/[email protected] | ||
id: php-composer-cache | ||
env: | ||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5' | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install Composer dependencies | ||
if: ${{ steps.php-composer-cache.outputs.cache-hit != 'true' }} | ||
run: composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction | ||
|
||
- name: Validate composer.json | ||
run: composer --no-interaction validate --no-check-all | ||
|
||
- name: Run PHPCS inspection | ||
uses: rtCamp/action-phpcs-code-review@master | ||
env: | ||
SKIP_FOLDERS: "tests,.github" | ||
GH_BOT_TOKEN: ${{ secrets.RTBOT_TOKEN }} |