Skip to content

Commit

Permalink
10631: Get CircleCI to store Python coverage report (#10640)
Browse files Browse the repository at this point in the history
* 10631: Get CircleCI to store Python coverage report

* 10631: Ensure coverage config file is copied into Docker container

..so that artefacts end up in the expected place for downstream processing

* 10631: Copy the coverage report to the CI host so it can be collected as an artefact

* 10631: Support CodeCov reporting
  • Loading branch information
stevejalim committed Oct 27, 2021
1 parent af7db12 commit 65d7663
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version: 2
version: 2.1
orbs:
codecov: codecov/codecov@3.1.1
jobs:
test_py:
docker:
Expand All @@ -12,7 +14,14 @@ jobs:
version: 19.03.13
- run:
name: Python Tests
command: make clean test-image
command: |
make clean test-image
CONTAINER_ID=$(docker ps -alq)
docker cp $CONTAINER_ID:/app/python_coverage .
- store_artifacts:
path: python_coverage
- codecov/upload:
file: python_coverage/coverage.xml

test_js:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ ignore_errors = True


[html]
directory=python_coverage/
directory=python_coverage
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ RUN pip install --no-cache-dir -r requirements/dev.txt
RUN pip install --no-cache-dir -r requirements/docs.txt
COPY ./setup.cfg ./
COPY ./pyproject.toml ./
COPY ./.coveragerc ./
COPY ./tests ./tests

RUN bin/run-sync-all.sh
Expand Down
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
# See status checks but prevent them from blocking
project:
default:
informational: true
patch:
default:
informational: true

0 comments on commit 65d7663

Please sign in to comment.