-
Notifications
You must be signed in to change notification settings - Fork 450
100 lines (84 loc) · 2.55 KB
/
continuous-integration.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
name: 'Continuous integration'
on: ['push', 'pull_request']
jobs:
cs:
runs-on: 'ubuntu-latest'
name: 'Coding style'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v2'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '7.4'
coverage: 'none'
extensions: 'json, mbstring, tokenizer'
tools: 'composer-normalize, php-cs-fixer:2.16.4'
env:
update: true
- name: 'Display tools versions'
run: |
composer-normalize --version
php-cs-fixer --version
- name: 'Check PHP code'
run: 'php-cs-fixer fix --diff --dry-run --using-cache=false'
- name: 'Check composer.json'
run: 'composer-normalize --diff --dry-run --no-update-lock'
code-quality:
runs-on: 'ubuntu-latest'
name: 'Code Quality'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v2'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '7.4'
coverage: 'none'
extensions: 'json, mbstring, tokenizer'
env:
update: true
- uses: 'ramsey/composer-install@v2'
- name: 'Display tools versions'
run: 'vendor/bin/phpstan --version'
- name: 'Run PHPStan'
run: 'vendor/bin/phpstan analyse --configuration phpstan.neon'
unit-tests:
runs-on: 'ubuntu-latest'
name: 'Unit Tests'
strategy:
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
dependencies:
- 'lowest'
- 'highest'
- 'beta'
include:
- dependencies: 'beta'
env:
SYMFONY_VERSION: '${{ matrix.symfony_version }}'
steps:
- name: 'Checkout'
uses: 'actions/checkout@v2'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php }}'
coverage: 'none'
tools: 'composer:2'
extensions: 'mongodb'
env:
update: true
- run: 'make composer-compat'
- run: |
if [ "${{ matrix.dependencies }}" = "beta" ]; then make composer-config-beta; fi;
- run: 'composer rem symfony/form -n --no-update && composer req "symfony/form: ^4.4 || ^5.1" doctrine/annotations --no-update -n'
- uses: 'ramsey/composer-install@v2'
with:
dependency-versions: '${{ matrix.dependencies }}'
composer-options: '${{ matrix.composer-options }}'
- run: 'make phpunit-coverage'