forked from PGScatalog/PGS_Catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (32 loc) · 1.6 KB
/
.travis.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
language: python
python:
- "3.7"
dist: bionic
services:
- postgresql
env:
- DEBUG=False ALLOWED_HOSTS=localhost PGS_LIVE_SITE='True' PGS_CURATION_SITE='False'
DATABASE_NAME=travis_ci_test DATABASE_USER=postgres DATABASE_PASSWORD=password DATABASE_HOST=localhost DATABASE_PORT=5432
DATABASE_NAME_2=travis_ci_test_2 DATABASE_USER_2=postgres DATABASE_PASSWORD_2=password DATABASE_HOST_2=localhost DATABASE_PORT_2=5432
REST_URL_ROOT=http://127.0.0.1/rest/ ELASTICSEARCH_URL_ROOT=http://localhost:9200 SECRET_KEY=1234
GS_SERVICE_ACCOUNT_SETTINGS=data.json GS_BUCKET_NAME=bucket
install:
- pip install -r requirements.txt
- pip install requests
before_script:
- curl -s -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.8.0-amd64.deb
- sudo dpkg -i --force-confnew elasticsearch-7.8.0-amd64.deb
- sudo sed -i.old 's/-Xms1g/-Xms256m/' /etc/elasticsearch/jvm.options
- sudo sed -i.old 's/-Xmx1g/-Xmx256m/' /etc/elasticsearch/jvm.options
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo systemctl start elasticsearch
- sleep 10
- psql -c 'create database travis_ci_test;' -U postgres
- psql -c 'create database travis_ci_test_2;' -U postgres
- python manage.py makemigrations
- python manage.py migrate
- python manage.py makemigrations benchmark
- python manage.py migrate benchmark --database=benchmark
script:
- python manage.py test catalog/tests rest_api/tests benchmark/tests