-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (46 loc) · 1.64 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
47
48
49
50
51
52
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python
# image: python:2.7.14
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
services:
- name: mysql:latest
alias : db
# - postg'res:latest
variables:
MYSQL_DATABASE : ppl
MYSQL_ROOT_PASSWORD : ppl2018
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- ~/.cache/pip/
- /usr/bin/python2.7
- /usr/local/lib/python2.7/site-packages
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- python --version # Print out python version for debugging
# Uncomment next line if your Django app needs a JS runtime:
# - apt-get update -q && apt-get install nodejs -yqq
# - pip install -r requirements.txt
# To get Django tests to work you may need to create a settings file using
# the following DATABASES:
#
# variables:
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'ppl',
# 'USER': production_secrets['DB_USER'],
# 'PASSWORD': production_secrets['DB_PASSWORD'],
# }
# }
# and then adding `--settings app.settings.ci` (or similar) to the test command
test:
# variables:
# DATABASE_URL: "jdbc:mysql://localhost:3306/ppl"
script:
- python manage.py test
# - echo "y" | mysqladmin -uroot -pppl2018 drop test_ppl