-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (26 loc) · 1.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
language: python
python:
- "3.10"
before_install:
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo npm install -g less
install:
- pip install -r requirements.txt
- pip install -r nuremberg/core/tests/requirements.txt
services:
- mysql
before_script:
- mysql -uroot -e 'CREATE DATABASE IF NOT EXISTS nuremberg_dev'
- mysql -uroot -e 'CREATE DATABASE IF NOT EXISTS test_nuremberg_dev'
- mysql -uroot -e 'CREATE USER nuremberg; GRANT ALL ON nuremberg_dev.* TO nuremberg'
- mysql -uroot -e 'GRANT ALL ON test_nuremberg_dev.* TO nuremberg'
- mysql -unuremberg nuremberg_dev < nuremberg/core/tests/data.sql
- mysql -unuremberg test_nuremberg_dev < nuremberg/core/tests/data.sql
- curl -sSL https://raw.githubusercontent.com/ksclarke/travis-solr/master/travis-solr.sh | SOLR_VERSION=4.10.4 SOLR_CONFS="schema.xml" bash
- mkdir nuremberg_dev
- rsync -avz solr-4.10.4/example/solr/collection1/conf nuremberg_dev/
- cp schema.xml nuremberg_dev/conf/
- curl -sSL 'http://localhost:8983/solr/admin/cores?action=CREATE&name=nuremberg_dev&instanceDir='"$PWD"'/nuremberg_dev&schema=schema.xml'
- python manage.py rebuild_index --noinput
script: py.test