Usando DECIDE en travis.cl

De Wiki de EGC
Saltar a: navegación, buscar

Para poder compilar y ejecutar DECIDE dentro del entorno de travis, tendremos que crear un .travis.yml que agrupa todo el contenido de la práctica visto hasta ahora:

.TRAVIS.YML


language: python python: - "3.6" services: - postgresql env: - DJANGO=2.0 DB=postgres global:

 - PGPORT=5432

before_install: - cd decide install: - pip install -r ../requirements.txt before_script: - cp local_settings.example.py local_settings.py - psql -c "create user decide with password 'decide'" - psql -c "create database decide owner decide" - python manage.py migrate script: - python manage.py test addons:

 postgresql: "9.6"

Asímismo, para no tener que commitear al nuestro repositorio un local_settings.py, actualizaremos la versión por defecto disponible para que sea ejecutable dentro de los contenedores de travis:

LOCALSETTINGS.EXAMPLE.PY


 1 ALLOWED_HOSTS = ["*"]
 2 
 3 # Modules in use, commented modules that you won't use
 4 MODULES = [
 5     'authentication',
 6     'base',
 7     'booth',
 8     'census',
 9     'mixnet',
10     'postproc',
11     'store',
12     'visualizer',
13     'voting',
14 ]
15 
16 APIS = {
17     'authentication': 'http://localhost:8000',
18     'base': 'http://localhost:8000',
19     'booth': 'http://localhost:8000',
20     'census': 'http://localhost:8000',
21     'mixnet': 'http://localhost:8000',
22     'postproc': 'http://localhost:8000',
23     'store': 'http://localhost:8000',
24     'visualizer': 'http://localhost:8000',
25     'voting': 'http://localhost:8000',
26 }
27 
28 BASEURL = 'http://localhost:8000'
29 
30 DATABASES = {
31     'default': {
32         'ENGINE': 'django.db.backends.postgresql',
33         'NAME': 'postgres',
34         'USER': 'postgres',
35         'HOST': 'localhost',
36         'PORT': '5432',
37     }
38 }
39 
40 # number of bits for the key, all auths should use the same number of bits
41 KEYBITS = 256