-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.02 KB
/
quality.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
name: Quality
on:
pull_request:
paths:
- '**.php'
push:
paths:
- '**.php'
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
with:
php-version: 8.3
extension-csv: mbstring, dom, fileinfo, mysql, zip
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Install Composer dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
composer require --dev phpstan/phpstan
- name: Test Quality
run: |
export PATH="$HOME/.composer/vendor/bin:$PATH"
./vendor/bin/phpstan analyse --level=0 src
./vendor/bin/phpstan analyse --level=0 tests