Skip to content

Commit

Permalink
Store test results as artifacts
Browse files Browse the repository at this point in the history
Adjust the test commands to store the test results as XML, which are
then stored as test results.
  • Loading branch information
jwhitlock committed Feb 25, 2022
1 parent 6eeca71 commit 3b3ee60
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,19 @@ jobs:

- run:
name: Test Code
command: docker run --entrypoint "/app/.local/bin/coverage" fx-private-relay run --source=. -m pytest --cov=./ --cov-fail-under=60
command: |
docker create -v /tmp/test-results --name test-results alpine /bin/true
docker run test-results /bin/sh -c "chmod 0777 /tmp/test-results && chown 10001:10001 /tmp/test-results"
docker run \
--entrypoint "/bin/bash" \
--volumes-from test-results \
fx-private-relay \
-c \
'mkdir -p /tmp/test-results/pytest && mkdir -p /tmp/test-results/coverage && /app/.local/bin/coverage run --source=. --branch -m pytest --cov=./ --cov-fail-under=60 --junitxml=/tmp/test-results/pytest/results.xml && /app/.local/bin/coverage xml -o /tmp/test-results/coverage/results.xml'
docker cp test-results:/tmp/test-results /tmp
- store_test_results:
path: /tmp/test-results

deploy:
docker:
Expand Down

0 comments on commit 3b3ee60

Please sign in to comment.