-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
33 lines (31 loc) · 1.02 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
stages:
- build_base
- test
build_base:
stage: build_base
only: [merge_requests, "/master/"]
tags:
- docker-build
image: docker/compose:latest
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE/base_image:latest
- docker build -f docker/Dockerfile.dev -t $CI_REGISTRY_IMAGE/base_image:latest .
- docker push $CI_REGISTRY_IMAGE/base_image:latest
test:
stage: test
only: [merge_requests, "/master/"]
when: on_success
tags:
- docker-build
image: $CI_REGISTRY_IMAGE/base_image:latest
script:
- composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
- composer validate --no-check-publish --no-interaction --ansi
- composer run lint
- composer run qc
- phpdbg -qrr ./vendor/bin/phpunit
- cat tests/_reports/coverage.txt | head -n 10 | grep "Lines"