From 79f1e34011f15b01637885ebecda4a94436b21d7 Mon Sep 17 00:00:00 2001 From: davidwilby Date: Tue, 27 Oct 2020 19:03:58 +0000 Subject: [PATCH] run tests against running container on travis --- .travis.yml | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9db726d..2dbe8fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,5 @@ -# Stuff shared by all builds -install: - - pip install ".[dev]" -script: - - ./.ci/travis_checks.sh - +services: + - docker matrix: include: @@ -12,19 +8,15 @@ matrix: os: linux python: 3.6 - # This is actually a py3.6 + Mac OSX build (with conda). - # The mac + python version pairings for Travis are weird, - # and as of this writing 3.6 isn't supported. For more, see - # https://docs.travis-ci.com/user/multi-os/#python-example-unsupported-languages - - os: osx - language: generic - before_install: - - wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-MacOSX-x86_64.sh -O miniconda.sh - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - - conda info -a - - conda create -q -n testenv python=3.6.12 nose pytest - - source activate testenv +before_install: + - pip install -U pip + - pip install awscli + - aws s3 cp s3://autofocus/models/multilabel_model_20190407.pkl ./autofocus/predict/models/ + - docker build -t test-autofocus-serve ./autofocus/predict/ + - docker ps -a + - docker run -d -p 8000:8000 test-autofocus-serve +install: + - pip install ".[dev]" +script: + - ./.ci/travis_checks.sh + - ./.ci/local_checks.sh