Skip to content
This repository was archived by the owner on Nov 11, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[run]
branch = True
source = .
data_file = .coverage
13 changes: 13 additions & 0 deletions .travis-docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2'

services:
edxops-notifier:
image: edxops/notifier:latest
container_name: notifier_testing
volumes:
- .:/edx/app/notifier/notifier
# The docker container produced from configuration.git does not currently
# run and expose a port for notifier. This means that we need to run some
# command that keeps the notifier container alive while we run tests on it.
# We have not yet standardized on an init replacement which could be used instead.
command: tail -f /dev/null
21 changes: 17 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
language: python
python:
- "2.7"

sudo: required
services:
- docker

cache:
- pip

before_install:
- docker-compose -f ./.travis-docker-compose.yml up -d

install:
- pip install -r requirements.txt
- pip install coveralls
- docker exec -t notifier_testing bash -c 'pip install -r /edx/app/notifier/notifier/requirements.txt'
script:
- python manage.py test notifier
- docker exec -t notifier_testing bash -c 'cd /edx/app/notifier/notifier && coverage run /edx/app/notifier/notifier/manage.py test notifier'

after_success:
- coveralls
- pip install -U codecov
- docker exec notifier_testing /edx/app/notifier/notifier/run_coverage.sh
- codecov
4 changes: 4 additions & 0 deletions run_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -xe
. /edx/app/notifier/virtualenvs/notifier/bin/activate
cd /edx/app/notifier/notifier
coverage xml