.circleci/config.yml
version: 2
jobs:
tests:
docker:
# Primary docker container where the tests will be run
- image: ubuntu:18.04
# Secondary docker container for database service
- image: postgres:11.5
environment:
POSTGRES_USER: root
# Secondary docker container for Elasticsearch service
- image: elasticsearch:2.4.6
working_directory: ~/adage-server
steps:
- run:
name: Install git and ssh
command: |
apt-get update && apt-get upgrade --yes
apt-get install git ssh --yes
- checkout
- run:
name: Configure get_pseudomonas
working_directory: ~/
command: |
apt-get install mercurial --yes
hg clone --config ui.tls=false https://bitbucket.org/greenelab/get_pseudomonas
ln -s ~/get_pseudomonas/gen_spreadsheets.py ~/
ln -s ~/get_pseudomonas/get_pseudo_sdrf.py ~/
- run:
name: Backend tests
working_directory: ~/adage-server/adage
command: |
apt-get install postgresql-client libpq-dev libpython-dev python-pip -y
createuser -h localhost --superuser ubuntu
createdb -h localhost circleci_test
pip install -r requirements.txt
python manage.py test
- run:
name: Frontend tests
working_directory: ~/adage-server/interface
command: |
apt-get install node.js npm libfontconfig -y
npm -g install grunt-cli karma-cli bower npm
apt-get purge npm --yes && hash -r
npm install
bower install --allow-root
grunt
grunt test
workflows:
version: 2
test:
jobs:
- tests