-
Notifications
You must be signed in to change notification settings - Fork 15
80 lines (77 loc) · 1.97 KB
/
tests.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Tests
on:
pull_request: null
push:
branches:
- 2.x
schedule:
- cron: "42 3 * * 1"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
composer_version: ['v2']
include:
- description: '(prefer lowest)'
php: '7.1'
composer_version: '2.0.0'
dependencies: 'lowest'
name: PHP ${{ matrix.php }} tests ${{ matrix.description }}
steps:
# checkout git
- uses: actions/checkout@v2
# setup PHP
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer_version }}
coverage: xdebug
- uses: "ramsey/composer-install@v1"
with:
dependency-versions: ${{ matrix.dependencies }}
- run: vendor/bin/phpunit --coverage-clover=coverage.xml
- uses: codecov/codecov-action@v1
with:
file: './coverage.xml'
fail_ci_if_error: true
PHP-CS-Fixer:
runs-on: ubuntu-latest
name: Code style
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
- uses: "ramsey/composer-install@v1"
- run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
PHPStan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
- uses: "ramsey/composer-install@v1"
- run: vendor/bin/phpstan analyse
Psalm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
- uses: "ramsey/composer-install@v1"
- run: vendor/bin/psalm