Commit 56846d51 by Bilal Ahmad Committed by Feanil Patel

course discovery with 16.04

parent fae69a00
......@@ -3,13 +3,10 @@ language: python
python:
- "3.5"
addons:
firefox: "latest"
services:
- docker
sudo: false
sudo: required
# Cache the pip directory. "cache: pip" doesn't work due to install override. See https://github.com/travis-ci/travis-ci/issues/3239.
cache:
......@@ -19,31 +16,12 @@ cache:
- course_discovery/static/bower_components
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "export DJANGO_SETTINGS_MODULE=course_discovery.settings.test"
- export PATH=$PATH:$PWD/node_modules/.bin
- docker run --detach --publish 9200:9200 --publish 9300:9300 elasticsearch:1.5.2
install:
- pip install -U pip wheel codecov
- make requirements
- make requirements.js
before_script:
# Give Elasticsearch time to start
- sleep 10
- docker-compose -f docker-compose.yml up -d
script:
# Ensure documentation can be compiled
- cd docs && make html && cd ..
# Check if translation files are up-to-date
- make validate_translations
# Compile static assets and validate the code
- make static -e DJANGO_SETTINGS_MODULE="course_discovery.settings.test"
- make validate
- docker exec course-discovery /edx/app/discovery/discovery/.travis/run_tests.sh
after_success:
- pip install -U codecov
- docker exec course-discovery /edx/app/discovery/discovery/.travis/run_coverage.sh
- codecov
#!/bin/bash -xe
. /edx/app/discovery/venvs/discovery/bin/activate
cd /edx/app/discovery/discovery
coverage xml
#!/bin/bash -xe
. /edx/app/discovery/venvs/discovery/bin/activate
. /edx/app/discovery/nodeenvs/discovery/bin/activate
apt update
apt install -y xvfb firefox gettext
cd /edx/app/discovery/discovery
pip install -U pip wheel
# Make it so bower can run without sudo.
# https://github.com/GeoNode/geonode/pull/1070
echo '{ "allow_root": true }' > /root/.bowerrc
make requirements
# Ensure documentation can be compiled
cd docs && make html
cd ..
export DJANGO_SETTINGS_MODULE=course_discovery.settings.test
# Check if translation files are up-to-date
make validate_translations
# Compile assets and run validation
xvfb-run make clean_static
xvfb-run make static
xvfb-run make validate_python
xvfb-run make validate_js
......@@ -33,7 +33,7 @@ services:
course-discovery:
# Uncomment this line to use the official course-discovery base image
image: edxops/course-discovery:latest
image: edxops/course-discovery:bilal-test
# Uncomment the next two lines to build from a local configuration repo
# build: ../configuration/docker/build/discovery/
......@@ -55,3 +55,4 @@ services:
- "18381:18381"
- "8381:8381"
- "48381:48381"
command: tail -f /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment