.gitlab-ci.yml 548 Bytes
Newer Older
1
image: docker
therealwa3er's avatar
therealwa3er committed
2

3
services:
4
5
6
#use docker in docker container
    - docker:dind
    
therealwa3er's avatar
therealwa3er committed
7
before_script:
8
9
10
11
12
13
#add docker compose into docker in docker image
    - docker info
    - apk update
    - apk upgrade
    - apk add python python-dev py-pip build-base
    - pip install docker-compose
therealwa3er's avatar
therealwa3er committed
14
15

stages:
therealwa3er's avatar
therealwa3er committed
16
17
    - build
    - test
therealwa3er's avatar
therealwa3er committed
18
    
therealwa3er's avatar
therealwa3er committed
19
build:
therealwa3er's avatar
therealwa3er committed
20
    script:
21
    # run docker compose
therealwa3er's avatar
therealwa3er committed
22
23
    - docker-compose -f docker/docker-compose.yml  up -d

therealwa3er's avatar
therealwa3er committed
24
25

test:
therealwa3er's avatar
therealwa3er committed
26
  script:
27
  #run Phpunit test
therealwa3er's avatar
therealwa3er committed
28
  - docker exec  -it -w //var/www/html/alecsia/app docker_alecsia_1   ./../vendor/bin/phpunit