diff --git a/.circleci/config.yml b/.circleci/config.yml index 233a0f7a7..982f218ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,6 +41,7 @@ jobs: --data build_parameters[BASE_TAG]=$BASE_TAG \ --data revision=$CIRCLE_SHA1 \ https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/$CIRCLE_BRANCH + test: working_directory: ~/code docker: @@ -63,6 +64,13 @@ jobs: parallelism: 6 steps: - checkout + - run: mkdir -p build/coverage + - persist_to_workspace: + root: build + paths: + - coverage + - attach_workspace: + at: build/coverage - restore_cache: key: source-{{ .Branch }}--{{ checksum "Pipfile.lock" }}-{{ checksum ".circleci/config.yml" }} - run: @@ -85,7 +93,6 @@ jobs: path: test-results - store_artifacts: path: build/coverage - destination: coverage - run: name: Triggering build_and_deploy job command: | diff --git a/tox.ini b/tox.ini index 2e6d66663..2b191db35 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ addopts = --echo-env=CIRCLECI --echo-env=PIPENV_VERBOSITY --capture=no + --cov-append --cov-report=html --cov-config=tests/.coveragerc --cov=etools_datamart @@ -57,6 +58,7 @@ commands = isort src/ tests/ --check-only pipenv run pytest --create-db \ -q \ + --cov-append \ --cov-report=term \ --cov-config=tests/.coveragerc \ --cov=etools_datamart \