Commit 3900dda2 by Clinton Blackburn

Split Travis tasks into multiple calls

This separation allows us to assess how much time is consumed by each operation in our build. This data can be used to tune the build and seek out areas for improvement.
parent 7cee9fbd
......@@ -16,13 +16,20 @@ cache:
before_install:
- make travis_up
# We have no requirements to install since everything is run in Docker.
install: true
install:
- docker exec -t discovery bash -c 'apt update && apt install -y xvfb firefox gettext wget'
- docker exec -t discovery bash -c 'sed -i "s/course_discovery.settings.devstack/course_discovery.settings.test/" /edx/app/discovery/discovery_env'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make requirements'
script:
- make travis_test
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make docs'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make validate_translations'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make clean_static'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make static'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && make quality'
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && xvfb-run make test'
after_success:
- pip install -U codecov
- docker exec course-discovery /edx/app/discovery/discovery/.travis/run_coverage.sh
- docker exec -t discovery bash -c 'source /edx/app/discovery/discovery_env && cd /edx/app/discovery/discovery/ && coverage xml'
- codecov
......@@ -17,14 +17,14 @@ services:
memcached:
image: memcached:1.4.24
container_name: memcached
course-discovery:
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
container_name: discovery
volumes:
- ..:/edx/app/discovery/discovery
- ../course_discovery/media:/edx/var/discovery/media
......
......@@ -32,7 +32,7 @@ clean: ## Delete generated byte code and coverage reports
requirements.js: ## Install JS requirements for local development
npm install
$(NODE_BIN)/bower install
$(NODE_BIN)/bower install --allow-root
requirements: requirements.js ## Install Python and JS requirements for local development
pip install -r requirements/local.txt
......@@ -40,10 +40,11 @@ requirements: requirements.js ## Install Python and JS requirements for local de
production-requirements: ## Install Python and JS requirements for production
pip install -r requirements.txt
npm install --production
$(NODE_BIN)/bower install --production
$(NODE_BIN)/bower install --allow-root --production
test: clean ## Run tests and generate coverage report
coverage run -m pytest --durations=25
## The node_modules .bin directory is added to ensure we have access to Geckodriver.
PATH="$(NODE_BIN):$(PATH)" coverage run -m pytest --durations=25
coverage combine
coverage report
......
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