-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitlab-ci.yml
46 lines (38 loc) · 1.24 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
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
stages:
- lint_tests
- integration_tests
lint_tests:
image: registry.gitlab.com/viniarck/phpipam-pyclient:dev
stage: lint_tests
script:
# find all py files excluding hidden files
- find . -type f | grep -v '/\.' | xargs ls | egrep ".py$" | xargs pylama
.integration_tests: &integration_def
stage: integration_tests
before_script:
- apk add --no-cache py-pip
- pip install docker-compose==1.23.2
after_script:
- docker ps
- sleep 10
- docker ps
- docker exec phpipampyclient_phpipam_pyclient_1 /bin/bash -c 'python3 -m pytest tests/test_phpipam_installation.py -v'
- docker exec phpipampyclient_phpipam_pyclient_1 /bin/bash -c 'python3 -m pytest tests/test_phpipam_client.py -v'
- docker exec phpipampyclient_phpipam_pyclient_1 /bin/bash -c 'tox'
test_phpipam_latest:
<<: *integration_def
script:
- docker-compose -p phpipampyclient up -d
test_phpipam_1.3.1:
<<: *integration_def
script:
- docker-compose -p phpipampyclient -f docker-compose-1.3.1.yml up -d
test_phpipam_1.3:
<<: *integration_def
script:
- docker-compose -p phpipampyclient -f docker-compose-1.3.yml up -d