Commit f135475a by Feanil Patel

Run tests on Ubuntu 16.04.

This commit also switches us from coveralls to codecov.
parent 72c71de8
language: python
python: "2.7"
install:
- "pip install coveralls"
- "make test.install_elasticsearch"
cache: pip
# Use docker for builds
sudo: false
before_script:
- make test.run_elasticsearch
# Recommended by Travis in order to make sure ElasticSearch
# actually starts up. See # https://docs.travis-ci.com/user/database-setup/#ElasticSearch
- sleep 10
python:
- "2.7"
services:
- docker
sudo: required
before_install:
- docker-compose -f .travis/docker-compose-travis.yml up -d
script:
- make validate
- git fetch origin master:refs/remotes/origin/master # https://github.com/edx/diff-cover#troubleshooting
- make diff.report
- docker exec analytics_api_testing /edx/app/analytics_api/analytics_api/.travis/run_tests.sh
after_success:
- coveralls
- bash ./scripts/build-stats-to-datadog.sh
- pip install -U codecov
- 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.
.. |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
.. |coverage-status| image:: https://coveralls.io/repos/edx/edx-analytics-data-api/badge.png?branch=master
:target: https://coveralls.io/r/edx/edx-analytics-data-api?branch=master
.. |coverage-status| image:: https://img.shields.io/codecov/c/github/edx/edx-analytics-data-api/master.svg
:target: https://codecov.io/gh/edx/edx-analytics-data-api
......@@ -26,7 +26,7 @@ LMS_USER_ACCOUNT_BASE_URL = 'http://lms-host'
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
# 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_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