-
Notifications
You must be signed in to change notification settings - Fork 13
143 lines (131 loc) · 4.46 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
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.2'
symfony: '2.8.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.0.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.1.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.2.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.3.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '3.4.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.0.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.1.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_4.neon
- php: '7.2'
symfony: '4.2.*'
geoip2: '~2.0'
phpstan: .phpstan/default.neon
- php: '7.2'
symfony: '4.3.*'
geoip2: '~2.0'
phpstan: .phpstan/default.neon
- php: '7.2'
symfony: '4.4.*'
geoip2: '~2.0'
phpstan: .phpstan/default.neon
- php: '7.2'
symfony: '5.0.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_5.neon
- php: '7.2'
symfony: '5.1.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_5.neon
- php: '7.2'
symfony: '5.2.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_5.neon
- php: '8.0'
symfony: '5.2.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_5.neon
- php: '8.1'
symfony: '6.4.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_6.neon
- php: '8.2'
symfony: '7.0.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_6.neon
- php: '8.3'
symfony: '7.0.*'
geoip2: '~2.0'
phpstan: .phpstan/symfony_6.neon
- php: '8.3'
symfony: '7.0.*'
geoip2: '~3.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::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 GeoIP2-php
run: composer require geoip2/geoip2:"${{ matrix.geoip2 }}" --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' && matrix.php != '8.1' && matrix.php != '8.2' && matrix.php != '8.3'
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' && matrix.php != '8.1' && matrix.php != '8.2' && matrix.php != '8.3'
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:"1.10.*"
composer global require phpstan/phpstan-phpunit:"1.3.*"
- name: Run PHPStan
run: phpstan --memory-limit=1G analyse -c ${{ matrix.phpstan }}