-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
90 lines (80 loc) · 1.93 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
90 lines (80 loc) · 1.93 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
# This file is a template, and might need editing before it works on your project.
# Select image from https://hub.docker.com/_/php/
image: docker.2up.io/php7.4.2-cli:latest
# Select what we should cache between builds
cache:
paths:
- vendor/
# Define pipeline stages
stages:
- prep
- syntax
- mess
- tests
- security
composer:
stage: prep
script:
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
artifacts:
paths:
- vendor/
expire_in: 1 days
when: always
only:
refs:
- master
phpcs:
stage: syntax
script:
- ./vendor/bin/phpcs --error-severity=1 --warning-severity=8 --extensions=php
only:
refs:
- master
phpmd:
stage: mess
script:
- ./vendor/phpmd/phpmd/src/bin/phpmd src/ text _phpmd/rules.xml
only:
refs:
- master
allow_failure: true
php-7.2:
image: docker.2up.io/2up/php7.2-cli:latest
stage: tests
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-text
only:
refs:
- master
php-7.3:
image: docker.2up.io/php7.3.14-cli:latest
stage: tests
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-text
only:
refs:
- master
php-7.4:
image: docker.2up.io/php7.4.2-cli:latest
stage: tests
script:
- vendor/bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-text
only:
refs:
- master
sensiolabs:
stage: security
script:
- test -d security-checker || git clone https://github.com/sensiolabs/security-checker.git
- cd security-checker
- composer install
- php security-checker security:check ../composer.lock
only:
refs:
- master
# Run our tests
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
#test:
# script:
# - vendor/bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-text