From c7f68c1a2462742b73719aeadaa706eb4fd8f4dd Mon Sep 17 00:00:00 2001 From: Christian Jensen Date: Mon, 23 Oct 2017 15:32:51 -0700 Subject: [PATCH] New travis --- .travis.yml | 22 +++++++--------------- tools.sh | 8 ++++++-- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index dcfd56a..7cf2201 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,18 @@ +sudo: required -language: python +services: + - docker -python: - - "3.6" env: global: - - PYTHONPATH=$PYTHONPATH:$(pwd)/agent - SN_AGENT_ID=b545478a-971a-48ec-bc56-4b9b7176799c - SN_SERVICE_ADAPTER_CONFIG_FILE=agent/service_adapter_config_example.yml -install: - - pip install -r agent/requirements.txt - - git clone --branch 1.3.6 https://github.com/savoirfairelinux/opendht.git - - cd opendht - - mkdir build - - cd build - - cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DOPENDHT_PYTHON=On -DOPENDHT_LTO=On - - make -j8 - - make install +before_install: + - docker build -t singularitynet_agent agent script: - - py.test --verbose --cov-config agent/.coveragerc --cov=sn_agent agent/tests + - docker run singularitynet_agent /bin/sh -c "py.test --verbose --cov-config agent/.coveragerc --cov=sn_agent agent/tests" after_success: - - coveralls + - docker run singularitynet_agent /bin/bash -c "coveralls" diff --git a/tools.sh b/tools.sh index a4ba17e..2542738 100755 --- a/tools.sh +++ b/tools.sh @@ -27,8 +27,12 @@ agent-docs) ;; agent-test) - recreate_agent_image - docker-compose run agent ./agent.sh test + docker-compose create --build --force-recreate alice + docker-compose run alice ./agent.sh test + ;; + +travis-test) + py.test --verbose --cov-config agent/.coveragerc --cov=sn_agent agent/tests ;; agent-web)