Commit d1bcc5be by Feanil Patel Committed by GitHub

Merge pull request #147 from edx/feanil/analytics-api-16.04

Moving to running analytics tests on 16.04
parents 72c71de8 f135475a
language: python language: python
python: "2.7" python:
install: - "2.7"
- "pip install coveralls"
- "make test.install_elasticsearch" services:
cache: pip - docker
# Use docker for builds sudo: required
sudo: false
before_script: before_install:
- make test.run_elasticsearch - docker-compose -f .travis/docker-compose-travis.yml up -d
# Recommended by Travis in order to make sure ElasticSearch
# actually starts up. See # https://docs.travis-ci.com/user/database-setup/#ElasticSearch
- sleep 10
script: script:
- make validate - docker exec analytics_api_testing /edx/app/analytics_api/analytics_api/.travis/run_tests.sh
- git fetch origin master:refs/remotes/origin/master # https://github.com/edx/diff-cover#troubleshooting
- make diff.report
after_success: after_success:
- coveralls - pip install -U codecov
- bash ./scripts/build-stats-to-datadog.sh - docker exec analytics_api_testing /edx/app/analytics_api/analytics_api/.travis/run_coverage.sh
- codecov
version: "2"
services:
analytics_api:
image: edxops/analytics_api:latest
container_name: analytics_api_testing
volumes:
- ..:/edx/app/analytics_api/analytics_api
command: tail -f /dev/null
environment:
ELASTICSEARCH_LEARNERS_HOST: 'http://es:9200/'
# Pull these from the host environment.
TRAVIS_BRANCH:
TRAVIS_PULL_REQUEST:
DATADOG_API_KEY:
depends_on:
- "es"
es:
image: elasticsearch:1.5.2
container_name: es
#!/bin/bash -xe
. /edx/app/analytics_api/venvs/analytics_api/bin/activate
cd /edx/app/analytics_api/analytics_api
make diff.report
coverage xml
bash ./scripts/build-stats-to-datadog.sh
#!/bin/bash -xe
. /edx/app/analytics_api/venvs/analytics_api/bin/activate
cd /edx/app/analytics_api/analytics_api
make validate
...@@ -91,5 +91,5 @@ will make your contribution more likely to be accepted. ...@@ -91,5 +91,5 @@ will make your contribution more likely to be accepted.
.. |build-status| image:: https://travis-ci.org/edx/edx-analytics-data-api.svg?branch=master .. |build-status| image:: https://travis-ci.org/edx/edx-analytics-data-api.svg?branch=master
:target: https://travis-ci.org/edx/edx-analytics-data-api :target: https://travis-ci.org/edx/edx-analytics-data-api
.. |coverage-status| image:: https://coveralls.io/repos/edx/edx-analytics-data-api/badge.png?branch=master .. |coverage-status| image:: https://img.shields.io/codecov/c/github/edx/edx-analytics-data-api/master.svg
:target: https://coveralls.io/r/edx/edx-analytics-data-api?branch=master :target: https://codecov.io/gh/edx/edx-analytics-data-api
...@@ -26,7 +26,7 @@ LMS_USER_ACCOUNT_BASE_URL = 'http://lms-host' ...@@ -26,7 +26,7 @@ LMS_USER_ACCOUNT_BASE_URL = 'http://lms-host'
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
# Default elasticsearch port when running locally # Default elasticsearch port when running locally
ELASTICSEARCH_LEARNERS_HOST = 'http://localhost:9223/' ELASTICSEARCH_LEARNERS_HOST = environ.get("ELASTICSEARCH_LEARNERS_HOST", 'http://localhost:9223/')
ELASTICSEARCH_LEARNERS_INDEX = 'roster_test' ELASTICSEARCH_LEARNERS_INDEX = 'roster_test'
ELASTICSEARCH_LEARNERS_UPDATE_INDEX = 'index_update_test' ELASTICSEARCH_LEARNERS_UPDATE_INDEX = 'index_update_test'
......
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