-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (41 loc) · 1.16 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
stages:
- test
.test_template:
stage: test
cache:
untracked: false
paths:
- $COMPOSER_HOME/cache
artifacts:
expire_in: 1 hour
name: "$CI_PROJECT_PATH_SLUG-$CI_PIPELINE_ID"
paths:
- build/coverage
- build/doc
variables:
COMPOSER_HOME: "$CI_PROJECT_DIR/build/.composer"
script:
- php-ext.sh enable 'xdebug'
- setup-gitlab-token-auth.sh -- "$CI_JOB_TOKEN" "$CI_SERVER_HOST"
- composer install --no-progress
- phpcs $CI_PROJECT_DIR/src $CI_PROJECT_DIR/tests --standard=PSR2 -p
- XDEBUG_MODE=coverage php vendor/bin/phpunit $CI_PROJECT_DIR/tests --coverage-text -vv --colors=never
- sami update sami.php
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
tags:
- shared
test_php56:
extends: .test_template
image: $CI_REGISTRY/docker/alpine38-php56:v1
test_php71:
extends: .test_template
image: $CI_REGISTRY/docker/alpine37-php71:v2
test_php72:
extends: .test_template
image: $CI_REGISTRY/docker/alpine39-php72:v1
test_php73:
extends: .test_template
image: $CI_REGISTRY/docker/alpine312-php73:v1
test_php74:
extends: .test_template
image: $CI_REGISTRY/docker/alpine313-php74:v1