forked from OpenMage/magento-lts
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 1.09 KB
/
syntax-php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: PHP Syntax
on:
# Run automatically every Monday on midnight.
schedule:
- cron: '0 0 * * 1'
workflow_call:
# Allow manually triggering the workflow.
workflow_dispatch:
jobs:
syntax_php:
runs-on: [ubuntu-latest]
strategy:
matrix:
php: ['7.4', '8.1', '8.2']
name: PHP Syntax ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring #optional, setup extensions
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver
- name: Check .php files
run: '! find . -not \( -path ./.phpstorm.meta.php -prune \) -type f -name "*.php" -exec php -d error_reporting=32767 -l {} \; 2>&1 1> /dev/null | grep "^"'
- name: Check .phtml files
run: '! find app/design -type f -name "*.phtml" -exec php -d error_reporting=32767 -l {} \; 2>&1 1> /dev/null | grep "^"'