Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template files to phpstan checks #4245

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
php:
description: "Count changed PHP files"
value: ${{ jobs.check.outputs.php }}
phtml:
description: "Count changed Template files"
value: ${{ jobs.check.outputs.phtml }}
xml:
description: "Count changed XML files"
value: ${{ jobs.check.outputs.xml }}
Expand Down Expand Up @@ -44,6 +47,7 @@ jobs:
composer: ${{ steps.changes-composer.outputs.composer }}
js: ${{ steps.changes-js.outputs.js }}
php: ${{ steps.changes-php.outputs.php }}
phtml: ${{ steps.all.outputs.phtml }}
xml: ${{ steps.changes-xml.outputs.xml }}
workflow: ${{ steps.changes-workflow.outputs.workflow }}
phpcs: ${{ steps.changes-phpcs.outputs.phpcs }}
Expand Down Expand Up @@ -77,6 +81,7 @@ jobs:
composer.*
*.php
**/*.php
**/*.phtml
**/*.xml
**/*.js
.github/workflows/**
Expand Down Expand Up @@ -113,6 +118,14 @@ jobs:
echo "$count PHP file(s) changed"
echo "php=$count" >> $GITHUB_OUTPUT

- name: Check if Template files changed
id: changes-phtml
if: steps.changed-files-specific.outputs.any_modified == 'true'
run: |
count="$(grep -oE "*.phtml" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count Template file(s) changed"
echo "phtml=$count" >> $GITHUB_OUTPUT

- name: Check if XML files changed
id: changes-xml
if: steps.changed-files-specific.outputs.any_modified == 'true'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.phtml'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
Expand All @@ -22,6 +23,7 @@ on:
- 'composer.json'
- 'composer.lock'
- '**.php'
- '**.phtml'
- '**.js'
- '**.xml'
- '.php-cs-fixer.dist.php'
Expand Down Expand Up @@ -87,6 +89,7 @@ jobs:
needs: [check, composer]
if: |
needs.check.outputs.php > 0 ||
needs.check.outputs.phtml > 0 ||
needs.check.outputs.phpstan > 0 ||
needs.check.outputs.composer > 0 ||
needs.check.outputs.workflow > 0
Expand Down
Loading
Loading