-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
143 lines (131 loc) · 2.7 KB
/
.gitlab-ci.yml
File metadata and controls
143 lines (131 loc) · 2.7 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
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
stages:
- lint
- build
- test
image: in2code/php:7.4-fpm
lint-composer:
stage: lint
script:
- composer validate --strict
interruptible: true
needs: []
lint-php:
stage: lint
parallel:
matrix:
- PHP:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
image: in2code/php:$PHP-fpm
script:
- composer validate --strict
interruptible: true
needs: []
build-composer:
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- /tmp/composer/
script: composer install
artifacts:
paths:
- vendor/
interruptible: true
needs: []
build-phive:
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- /tmp/phive
script: phive install --force-accept-unsigned --trust-gpg-keys CF1A108D0E7AE720,31C7E470E2138192,4AA394086372C20A,12CE0F1D262429A5,C00543248C87FB13,9093F8B32E4815AA,5E6DDE998AB73B8E
artifacts:
paths:
- .project/phars/
interruptible: true
needs: []
test-phpmd:
stage: test
script:
- .project/phars/phpmd src,tests ansi .phpmd.xml
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-phive" ]
test-phpstan:
stage: test
script:
- .project/phars/phpstan analyse -c .phpstan.neon
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-composer", "build-phive" ]
test-phpcs:
stage: test
script:
- .project/phars/phpcs
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-phive" ]
test-phpcpd:
stage: test
script:
- .project/phars/phpcpd --fuzzy --progress --ansi src/
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-phive" ]
test-psalm:
stage: test
script:
- .project/phars/psalm --config=.psalm.xml
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-composer", "build-phive" ]
test-phpunit:
stage: test
image: in2code/php-dev:7.4-fpm
variables:
XDEBUG_MODE: coverage
script:
- vendor/bin/phpunit --coverage-text
only:
changes:
- src/**/*.php
- tests/**/*.php
artifacts:
reports:
junit: .project/artifacts/phpunit/coverage/junit.xml
interruptible: true
needs: [ "build-composer", "build-phive" ]
test-infection:
stage: test
image: in2code/php-dev:7.4-fpm
variables:
XDEBUG_MODE: coverage
script:
- vendor/bin/infection --configuration=.infection.json -j$(nproc) -s --min-covered-msi=100
only:
changes:
- src/**/*.php
- tests/**/*.php
interruptible: true
needs: [ "build-composer", "build-phive" ]