-
Notifications
You must be signed in to change notification settings - Fork 13
115 lines (104 loc) · 3.57 KB
/
test.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Test
on:
push:
pull_request:
jobs:
test:
name: 'PHP ${{ matrix.php }} + Symfony ${{ matrix.symfony }}'
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- php: '7.1'
symfony: '2.8.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.0.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.1.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.2.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.3.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '3.4.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.0.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.1.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.2.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.3.*'
phpstan: .phpstan/default.neon
- php: '7.1'
symfony: '4.4.*'
phpstan: .phpstan/default.neon
- php: '7.2'
symfony: '5.0.*'
phpstan: .phpstan/symfony_5.neon
- php: '7.2'
symfony: '5.1.*'
phpstan: .phpstan/symfony_5.neon
- php: '7.2'
symfony: '5.2.*'
phpstan: .phpstan/symfony_5.neon
- php: '8.0'
symfony: '5.2.*'
phpstan: .phpstan/symfony_5.neon
- php: '8.1'
symfony: '6.4.*'
phpstan: .phpstan/symfony_6.neon
- php: '8.2'
symfony: '7.0.*'
phpstan: .phpstan/symfony_6.neon
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure coverage driver
id: coverage
run: echo ::set-output name=driver::$([ "${{ matrix.php }}" = "7.1" ] && echo "xdebug" || echo "pcov")
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ steps.coverage.outputs.driver }}
tools: composer:v2
- name: Install Symfony
run: composer require symfony/symfony:"${{ matrix.symfony }}" --no-update
- name: 'Install Composer dependencies (highest)'
uses: 'ramsey/composer-install@v1'
with:
dependency-versions: 'highest'
- name: Run Tests
run: vendor/bin/phpunit --coverage-clover build/coverage-clover.xml
- name: Send coverage results to Scrutinizer CI
if: matrix.php != '8.0'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/coverage-clover.xml
- name: Send coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: 'PHP ${{ matrix.php }} + ${{ matrix.symfony }}'
if: matrix.php != '8.0'
run: |
composer global require php-coveralls/php-coveralls
php-coveralls -x build/coverage-clover.xml -o build/coveralls-upload.json -v
- name: Install PHPStan
run: |
composer global require phpstan/phpstan:"0.12.*"
composer global require phpstan/phpstan-phpunit:"0.12.*"
- name: Run PHPStan
run: phpstan --memory-limit=1G analyse -c ${{ matrix.phpstan }}