-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
41 lines (34 loc) · 1.69 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
sudo: required
language: python
python:
- "3.4"
services:
- docker
before_install:
# Reset some timestamps to get more docker caching
- find ./ | grep -v .git | xargs touch -t 200001010000.00
- docker pull opendataservices/resource-projects-etl || true
- docker pull opendataservices/resource-projects-etl:${TRAVIS_TAG:-$TRAVIS_BRANCH} || true
- docker build -t opendataservices/resource-projects-etl .
# https://github.com/travis-ci/travis-ci/issues/4778
- sudo service docker restart ; sleep 10
# Run virtuoso
- docker run -d -p 127.0.0.1:8890:8890 --name virtuoso opendataservices/virtuoso:master
# Run the ETL dashboard
- docker run -d -p 127.0.0.1:8000:80 --link virtuoso:virtuoso -e DBA_PASS=dba opendataservices/resource-projects-etl
- sudo apt-get update
- sudo apt-get install -y xvfb firefox
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# Run initial setup sql commands on virtuoso (run this after installing
# xvfb just to give virtuoso some time to get started)
- cat virtuoso_setup.sql | docker run --link virtuoso:virtuoso -i --rm opendataservices/virtuoso:master isql virtuoso
install:
- pip install -r requirements_test.txt
before_script:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker push opendataservices/resource-projects-etl
script:
- SERVER_URL=http://localhost:8000 py.test fts
after_success:
- if [[ $TRAVIS_PULL_REQUEST -eq "false" ]]; then docker tag -f opendataservices/resource-projects-etl opendataservices/resource-projects-etl:${TRAVIS_TAG:-$TRAVIS_BRANCH}; docker push opendataservices/resource-projects-etl:${TRAVIS_TAG:-$TRAVIS_BRANCH}; fi