From 9e76345276b5f6ed499c8dc3936e4da34a1a72a7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 1 Aug 2018 16:02:49 +0200 Subject: [PATCH] activate test env needed for codecov to find necessary commands codecov appears to need git as well environment variables must be set at runtime using a weird [$BASH_ENV trick](https://circleci.com/docs/2.0/env-vars/#using-bash_env-to-set-environment-variables) since circle doesn't support simple `PATH: bin:$PATH` in the environment variable spec. --- .circleci/config.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd4b98a..1a6c4db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: - run: name: install python command: | - apt-get update --yes && apt-get install --yes python3 python3-venv + apt-get update --yes && apt-get install --yes python3 python3-venv git # Download and cache dependencies - restore_cache: @@ -26,12 +26,13 @@ jobs: name: Setup venv command: | python3 -m venv /srv/venv + echo 'export PATH=/srv/venv/bin:$PATH' >> $BASH_ENV - run: name: install dependencies command: | - /srv/venv/bin/pip install -r dev-requirements.txt - /srv/venv/bin/pip install -e . + pip install -r dev-requirements.txt + pip install -e . - save_cache: paths: @@ -41,12 +42,12 @@ jobs: - run: name: run unit tests command: | - /srv/venv/bin/py.test --cov=tljh tests/ + py.test --cov=tljh tests/ - run: name: upload code coverage stats command: | - /srv/venv/bin/codecov + codecov integration-test: docker: