-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (28 loc) · 1.03 KB
/
phan-phpunit.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
name: Static analysis (phan) & Unit Testing (phpunit)
on:
pull_request:
paths:
- "**.php"
jobs:
phan-phpunit:
runs-on: ubuntu-latest
steps:
- name: Install PHP and dependencies
run: |
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install -y php7.4-cli php7.4-json php7.4-iconv php7.4-curl php-ast
sudo phpenmod -v 7.4 json iconv curl ast
sudo php -m | grep xdebug && sudo phpdismod -v 7.4 xdebug
- name: Install php-composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php --install-dir=/usr/local/bin
php -r "unlink('composer-setup.php');"
- uses: actions/checkout@v2
- name: Install composer packages
run: composer install
- name: Run phan from vendor folder
run: vendor/bin/phan -S -k ./.phan/config.php --no-progress-bar
- name: Run phpunit from vendor folder
run: vendor/bin/phpunit