RFC: feat(functions): PHP 7.4 preloading #1735
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
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 |