-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (39 loc) · 944 Bytes
/
.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
stages:
- build
- test
- deploy
setup:
stage: build
tags:
- docker
script:
- echo "Testing installation of dependencies"
- apt update && apt upgrade -y && apt install -y python3 python3-pip
- python3 -m pip install --upgrade pip
- pip3 install -r requirements.txt
custom-tests:
stage: test
tags:
- docker
script:
- apt update && apt upgrade -y && apt install -y python3 python3-pip
- python3 -m pip install --upgrade pip
- pip3 install -r requirements.txt
- echo "Running tests"
- cd ppsv
- python3 manage.py check
- python3 manage.py makemigrations
- python3 manage.py migrate
- coverage run --source='.' manage.py test
- coverage report
deploy-prod:
stage: deploy
tags:
- docker
only:
refs:
- master
script:
- echo "Building docker images and start containers ..."
- chmod +x start-production.sh
- ./start-production.sh