-
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.21 KB
/
Copy pathtests.yml
File metadata and controls
46 lines (36 loc) · 1.21 KB
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
46
name: tests
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
name: PHP ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
tools: composer:v2, php-cs-fixer, phpstan
coverage: none
- name: Run PHP CS Fixer
run: php-cs-fixer fix src --rules=@PSR12 --allow-risky=yes --dry-run --diff
env:
# Only ignore environment requirements when PHP 8.4 is being used
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.php == '8.4' && '1' || '' }}
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run PHPStan
run: phpstan analyse -l 9 src
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
XDEBUG_MODE: coverage
run: php -dpcov.enabled=1 vendor/bin/phpunit --testdox