-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
67 lines (63 loc) · 1.5 KB
/
.gitlab-ci.yml
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
stages:
- lint
- test
cache:
paths:
- vendor/
.lint: &lint
image: composer
stage: lint
before_script:
- apk --no-cache add parallel
- php -v
- composer --no-ansi self-update
- composer --no-ansi --version
- composer install --optimize-autoloader --classmap-authoritative --no-interaction --prefer-dist --no-ansi
artifacts:
when: on_failure
paths:
- result
lint:
<<: *lint
script:
- find . -name \*.php ! -path "./vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
lint:coding-guideline:
<<: *lint
script:
- mkdir result
- ./vendor/bin/phpcs -s -n --report=full --report-full=result/phpcs-full.txt --report-diff=result/phpcs-diff.txt --report-summary=result/phpcs-summary.txt
lint:php-mass-detection:
<<: *lint
script:
- mkdir result
- ./vendor/bin/phpmd src text phpmd.xml | tee result/phpmd.txt
.test: &test
stage: test
tags:
- docker
variables:
TIMEZONE: "Europe/Berlin"
WITH_XDEBUG: "true"
before_script:
- apt-get update; apt-get install -y unzip
- composer install --optimize-autoloader --no-interaction --no-ansi --prefer-dist
script:
- ./vendor/bin/phpunit --coverage-text --colors=never
test:5.4:
<<: *test
image: tetraweb/php:5.4
test:5.5:
<<: *test
image: tetraweb/php:5.5
test:5.6:
<<: *test
image: tetraweb/php:5.6
test:7.0:
<<: *test
image: tetraweb/php:7.0
test:7.1:
<<: *test
image: tetraweb/php:7.1
test:latest:
<<: *test
image: tetraweb/php:latest