Commit d08deed8 by Feanil Patel Committed by GitHub

Merge pull request #454 from edx/bilalahmad99/discovery-16.04

course discovery with 16.04
parents fae69a00 a9f47bc2
...@@ -3,47 +3,23 @@ language: python ...@@ -3,47 +3,23 @@ language: python
python: python:
- "3.5" - "3.5"
addons:
firefox: "latest"
services: services:
- docker - 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: cache:
- directories: - directories:
- $HOME/.cache/pip
- node_modules - node_modules
- course_discovery/static/bower_components - course_discovery/static/bower_components
before_install: before_install:
- "export DISPLAY=:99.0" - docker-compose -f .travis/docker-compose-travis.yml up -d
- "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
script: script:
# Ensure documentation can be compiled - docker exec course-discovery /edx/app/discovery/discovery/.travis/run_tests.sh
- 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
after_success: after_success:
- pip install -U codecov
- docker exec course-discovery /edx/app/discovery/discovery/.travis/run_coverage.sh
- codecov - codecov
version: "2"
services:
db:
image: mysql:5.6
container_name: db
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
environment:
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: "discov001"
MYSQL_PASSWORD: "password"
MYSQL_DATABASE: "discovery"
es:
image: elasticsearch:1.5.2
container_name: es
memcache:
image: memcached:1.4.24
container_name: memcache
course-discovery:
# Uncomment this line to use the official course-discovery base image
image: edxops/discovery:latest
# Uncomment the next two lines to build from a local configuration repo
# build: ../configuration/docker/build/discovery/
container_name: course-discovery
volumes:
- ..:/edx/app/discovery/discovery
- ../course_discovery/media:/edx/var/discovery/media
- ../course_discovery/assets:/edx/var/discovery/staticfiles
command: tail -f /dev/null
depends_on:
- "db"
- "es"
- "memcache"
environment:
TEST_ELASTICSEARCH_URL: "http://es:9200"
ENABLE_DJANGO_TOOLBAR: 1
#!/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 wget
pip install --upgrade selenium
cd /edx/app/discovery/discovery
export PATH=$PATH:$PWD/node_modules/.bin
# Make it so bower can run without sudo.
# https://github.com/GeoNode/geonode/pull/1070
echo '{ "allow_root": true }' > /root/.bowerrc
make requirements
make requirements.js
# 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
make clean_static
make static
xvfb-run make validate
...@@ -33,7 +33,7 @@ services: ...@@ -33,7 +33,7 @@ services:
course-discovery: course-discovery:
# Uncomment this line to use the official course-discovery base image # Uncomment this line to use the official course-discovery base image
image: edxops/course-discovery:latest image: edxops/discovery:latest
# Uncomment the next two lines to build from a local configuration repo # Uncomment the next two lines to build from a local configuration repo
# build: ../configuration/docker/build/discovery/ # build: ../configuration/docker/build/discovery/
......
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