-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
32 lines (27 loc) · 971 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
image: python:3.6
services:
- postgres:9.5
variables:
POSTGRES_DB: digestiflow_web
POSTGRES_USER: digestiflow_web
POSTGRES_PASSWORD: digestiflow_web
DATABASE_URL: postgres://digestiflow_web:digestiflow_web@postgres/digestiflow_web
before_script:
# SSH setup taken from https://gitlab.com/gitlab-examples/ssh-private-key
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- sh ./utility/install_os_gitlab.sh
- sh ./utility/install_chrome_gitlab.sh
- pip3 install virtualenv
- virtualenv env
- source env/bin/activate
- sh ./utility/install_python_dependencies.sh
all_tests:
script:
- python3 manage.py collectstatic --noinput
- coverage run --source="." manage.py test -v 2 --settings=config.settings.test
- coverage report
when: on_success