forked from archesproject/arches
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
116 lines (106 loc) · 5.2 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
os: linux
dist: xenial
filter_secrets: false
env:
- ES_VERSION=7.4.0 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}-linux-x86_64.tar.gz
addons:
postgresql: 9.6
apt:
packages:
- libxml2-dev
- libpq-dev
- openjdk-8-jdk
- python-dev
- postgresql-9.6-postgis-2.4
- libgconf2-4
services:
- postgresql
before_install:
- echo 'ELASTICSEARCH_PREFIX="arches"' > arches/settings_local.py
- psql -d postgres -c "ALTER USER postgres with encrypted password 'postgis';"
- echo "*:*:*:postgres:postgis" >> ~/.pgpass
- psql -d postgres -c "SET standard_conforming_strings = off;"
- psql -c "CREATE DATABASE template_postgis;"
- psql -d template_postgis -c "CREATE EXTENSION postgis;"
- "pip install -e ."
- pip install -r arches/install/requirements.txt
- pip install -r arches/install/requirements_dev.txt
- npm install -g wait-on
- pip install coveralls
- wget ${ES_DOWNLOAD_URL}
- tar -xzf elasticsearch-${ES_VERSION}-linux-x86_64.tar.gz
- "./elasticsearch-${ES_VERSION}/bin/elasticsearch -v &"
cache:
- apt
- pip
language:
- python
- node_js
python: 3.9
node_js:
- 10.8
- "lts/*"
- "node"
script: npm run build
jobs:
allow_failures:
- name: "Javascript - Cypress.io tests"
include:
- name: "Python 3 - Nose/unittests"
install: echo "Python dependences installed"
python: 3.9
script:
- wait-on http://localhost:9200/
- python manage.py test tests --pattern="*.py" --settings="tests.test_settings"
- name: "Javascript - Cypress.io tests"
install:
- yarn --cwd arches/install install
- npm install cypress --save-dev
- wait-on http://localhost:9200/
- python manage.py setup_db --force
cache:
npm: true
directories:
- ~/.cache
script:
- python manage.py runserver 0.0.0.0:8000 &
- $(npm bin)/cypress run
# after all tests finish running we need
# to kill all background jobs (like "npm start &")
- kill $(jobs -p) || true
- stage: deploy
install: echo "Deploying if 'master'"
script: echo ""
after_success:
- coveralls
notifications:
slack:
secure: j8ECDivRYYfWY/ZpWHDEDNjbJarKjBwzmbQLDRV/8JnI61xi965c8IdflUXrKNbTE7AV0QQIsSRj0Aq7e3V0aipH1xpWDGVPX18c80a9HbAV1MHTPjWNfkxzrCdhhTiq2wxzGQjObO298IcEdzHrZPYi0TA+P8PjtVj5c3cvmPYiB03irgLDeLZjbOaUvIn7/tzaO9GMINwY8zDG4rpjI3/yQ/KqofWu1M8tDLoA5+KBlGTYXQsBkh2CFd0AMQ0C5iejyG0PSe5vstVmLmD93HZoOzeKP9E10h5+JxONJ8cgQtNTYdrEZ5/zo3H1UJ+zB+UOxq8UdtwtvyZ/bej4HmjZJpxaXKnvC/hTVvCW4sd1Cty8At874UtPfUvnRYeIj0cCvtTcvQ/4bifkdfLY7GrhMm9e3PeMM3hYxM4+v0Q6q8TLxhaHZe06jDlNjp6vJTW31MAetJJw+894MDd5EHXpF6yf7VUrtkD01frVUEEMP7ZNN9oClPimOChoc73FaM1HRviwN31jScXN3NkW5lusEyoBPJALV3cGVUEfRaUUg5wvObJ+/vTG8h9kXj/N5NJl8E/SAJi74ro6nWoZFwX0JH5IrXW9d2Do12pJR3cEAdafryzvCF4R/8kOyWgumoAUklR8Stm064Go/9gnfCdJBwsfxv7pSvGLRi8DF/4=
# archesproject:
secure: KxA9qFRehHJYJPtESVf7s6NBtbzehLUhc88I0fN3MJchtsONiQZuRHIL8hvIkohK6di71BKvR3xFjxaI4zb2SzTdkeFRol9gPAfwV2tqU9GecPIXwKWMDYGZT5lbM2ofu7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F/v6LaFOJOZnc8qGiK42RktH5/63m72UJA2x5HDpLVtbHf7pZ+vXoXD1b6ePIU0JcW8Ka7p9MKWuYPJM27QERdvOBS4d51Uuyzspk6uRLydVuXqSErjiid6CbQS6YKVCnOQoOTbSQT1QcsFyA+Jf1I4usrkq8Wi4wHY8GcFnyf1uHxJMBaP83C7ZV76HQ1WhX2QGaLUxvDYdXi8xQ=
local_dir: dpl_cd_upload
skip_cleanup: true
on: &2
repo: archesproject/arches
branch: master
bucket: arches-codedeploy
# upload_dir: latest
- provider: codedeploy
access_key_id: AKIAIPJSP4QJ5VLPBKIQ
secret_access_key: *1
bucket: arches-codedeploy
key: arches-$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER-$TRAVIS_COMMIT.zip
bundle_type: zip
application: arches
deployment_group: arches_group
region: us-west-1
on: *2
before_deploy:
- zip codedeploy.zip -r --exclude=*__pycache__* appspec.yml arches/install/ci_install/*.sh
- mkdir -p dpl_cd_upload
- mv codedeploy.zip dpl_cd_upload/arches-$TRAVIS_BRANCH-$TRAVIS_BUILD_NUMBER-$TRAVIS_COMMIT.zip