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: ...@@ -16,13 +16,20 @@ cache:
before_install: before_install:
- make travis_up - make travis_up
# We have no requirements to install since everything is run in Docker. install:
install: true - 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: 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: after_success:
- pip install -U codecov - 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 - codecov
...@@ -17,14 +17,14 @@ services: ...@@ -17,14 +17,14 @@ services:
memcached: memcached:
image: memcached:1.4.24 image: memcached:1.4.24
container_name: memcached container_name: memcached
course-discovery: 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/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/
container_name: course-discovery container_name: discovery
volumes: volumes:
- ..:/edx/app/discovery/discovery - ..:/edx/app/discovery/discovery
- ../course_discovery/media:/edx/var/discovery/media - ../course_discovery/media:/edx/var/discovery/media
......
...@@ -32,7 +32,7 @@ clean: ## Delete generated byte code and coverage reports ...@@ -32,7 +32,7 @@ clean: ## Delete generated byte code and coverage reports
requirements.js: ## Install JS requirements for local development requirements.js: ## Install JS requirements for local development
npm install npm install
$(NODE_BIN)/bower install $(NODE_BIN)/bower install --allow-root
requirements: requirements.js ## Install Python and JS requirements for local development requirements: requirements.js ## Install Python and JS requirements for local development
pip install -r requirements/local.txt pip install -r requirements/local.txt
...@@ -40,10 +40,11 @@ requirements: requirements.js ## Install Python and JS requirements for local de ...@@ -40,10 +40,11 @@ requirements: requirements.js ## Install Python and JS requirements for local de
production-requirements: ## Install Python and JS requirements for production production-requirements: ## Install Python and JS requirements for production
pip install -r requirements.txt pip install -r requirements.txt
npm install --production npm install --production
$(NODE_BIN)/bower install --production $(NODE_BIN)/bower install --allow-root --production
test: clean ## Run tests and generate coverage report 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 combine
coverage report 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