Diferencia entre revisiones de «Usando DECIDE en travis.cl»

De Wiki de EGC
Saltar a: navegación, buscar
(Página creada con «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: .TRA...»)
 
Línea 30: Línea 30:
 
LOCALSETTINGS.EXAMPLE.PY
 
LOCALSETTINGS.EXAMPLE.PY
 
----------------------------------
 
----------------------------------
 +
<syntaxhighlight lang="Python" line='line'>
 
ALLOWED_HOSTS = ["*"]
 
ALLOWED_HOSTS = ["*"]
  
Línea 71: Línea 72:
 
# number of bits for the key, all auths should use the same number of bits
 
# number of bits for the key, all auths should use the same number of bits
 
KEYBITS = 256
 
KEYBITS = 256
 +
</syntaxhighlight>

Revisión del 02:10 19 nov 2018

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


ALLOWED_HOSTS = ["*"]

# Modules in use, commented modules that you won't use
MODULES = [
    'authentication',
    'base',
    'booth',
    'census',
    'mixnet',
    'postproc',
    'store',
    'visualizer',
    'voting',
]

APIS = {
    'authentication': 'http://localhost:8000',
    'base': 'http://localhost:8000',
    'booth': 'http://localhost:8000',
    'census': 'http://localhost:8000',
    'mixnet': 'http://localhost:8000',
    'postproc': 'http://localhost:8000',
    'store': 'http://localhost:8000',
    'visualizer': 'http://localhost:8000',
    'voting': 'http://localhost:8000',
}

BASEURL = 'http://localhost:8000'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'postgres',
        'USER': 'postgres',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

# number of bits for the key, all auths should use the same number of bits
KEYBITS = 256