forked from ATouhou/altapay-php-api
-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (35 loc) · 930 Bytes
/
code-analysis.yml
File metadata and controls
45 lines (35 loc) · 930 Bytes
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
40
41
42
43
44
45
name: PHP Code Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
php-stan:
runs-on: ubuntu-latest
steps:
- name: Install PHP 8.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Install required packages with composer
run: |
composer install
- name: Run PhpStan
run: |
vendor/phpstan/phpstan/phpstan analyze .
- name: Run PHP-CS-Fixer
run: |
vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix . --dry-run
- name: Run PHPUnit tests
run: |
vendor/phpunit/phpunit/phpunit tests
- name: Install PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Run Linter for PHP7.4
uses: StephaneBour/actions-php-lint@7.4
with:
dir: './src'