-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
79 lines (72 loc) · 1.65 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
68
69
70
71
72
73
74
75
76
77
78
79
image: docker:latest
stages:
- build-app
- test
- deploy
variables:
DOCKER_DRIVER: overlay2
build-php:
stage: build-app
image: composer
script:
- composer install --ignore-platform-reqs --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
cache:
key: $CI_BUILD_REF_NAME
paths:
- vendor/
artifacts:
name: "vendor_${CI_BUILD_REF_NAME}"
expire_in: 30 min
paths:
- vendor/
- app/config/parameters.yml
build-php-dev:
stage: build-app
image: composer
script:
- composer install --ignore-platform-reqs --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
cache:
key: $CI_BUILD_REF_NAME
paths:
- vendor/
artifacts:
name: "vendor_dev_${CI_BUILD_REF_NAME}"
expire_in: 30 min
paths:
- vendor/
- app/config/parameters.yml
test:
image: $CI_REGISTRY/backend/docker/images/php:7.3-cli
stage: test
script:
- SYMFONY_DEPRECATIONS_HELPER=disabled vendor/phpunit/phpunit/phpunit -d memory_limit=512M
dependencies:
- build-php-dev
except:
- master
test-coverage:
image: $CI_REGISTRY/backend/docker/images/php:7.3-pcov-cli
stage: test
script:
- SYMFONY_DEPRECATIONS_HELPER=disabled vendor/phpunit/phpunit/phpunit -d memory_limit=512M --coverage-text --colors=never --coverage-html coverage
dependencies:
- build-php-dev
artifacts:
paths:
- coverage/
only:
- master
pages:
stage: deploy
script:
- mv coverage public
dependencies:
- test-coverage
artifacts:
paths:
- public/
expire_in: 30 days
only:
- master
variables:
GIT_STRATEGY: none