-
Notifications
You must be signed in to change notification settings - Fork 1k
39 lines (34 loc) · 1.02 KB
/
lint.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
38
39
name: Lint
on:
push:
branches: [ main ]
pull_request:
jobs:
styles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Run Script
run: testing/run_cs_check.sh
staticanalysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- name: Run Script
run: |
composer global require phpstan/phpstan
for dir in $(find * -type d -name src -not -path 'appengine/*' -not -path '*/vendor/*' -exec dirname {} \;);
do
echo -e "\n RUNNING for => $dir\n"
composer install --working-dir=$dir --ignore-platform-reqs
echo "<?php require_once 'testing/sample_helpers.php';require_once '$dir/vendor/autoload.php';" > autoload.php
~/.composer/vendor/bin/phpstan analyse $dir/src --autoload-file=autoload.php
done