From f6f4bee7faba67b921ac3e5c087080cc58b5dbef Mon Sep 17 00:00:00 2001 From: CircleCI Config Suggestions Bot <131677722+CircleCI-config-suggestions-bot@users.noreply.github.com> Date: Fri, 5 May 2023 14:21:27 -0400 Subject: [PATCH] Upload test results to CircleCI --- .circleci/config.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05f868df9..dd981bc88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,13 +40,16 @@ jobs: pkg-manager: pip-dist # app-dir: ~/project/package-directory/ # If you're requirements.txt isn't in the root directory. # pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements. + - run: mkdir -p test-results - run: name: Run tests # This assumes pytest is installed via the install-package step above command: | - pytest --cov=./phys2bids + pytest --junitxml=test-results/junit.xml -o junit_family=legacy --cov=./phys2bids mkdir /tmp/src/coverage mv ./.coverage /tmp/src/coverage/.coverage.py37 + - store_test_results: + path: test-results - store_artifacts: path: /tmp/src/coverage # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. @@ -70,12 +73,15 @@ jobs: pypi-cache: false venv-cache: false pkg-manager: pip-dist + - run: mkdir -p test-results - run: name: Run tests command: | - pytest --cov=./phys2bids + pytest --junitxml=test-results/junit.xml -o junit_family=legacy --cov=./phys2bids mkdir /tmp/src/coverage mv ./.coverage /tmp/src/coverage/.coverage.py310 + - store_test_results: + path: test-results - store_artifacts: path: /tmp/src/coverage - persist_to_workspace: