Skip to content

Commit

Permalink
Merge pull request #197 from ral-facilities/feature/code-coverage-#167
Browse files Browse the repository at this point in the history
Add Code Coverage Reports
  • Loading branch information
MRichards99 authored Jan 19, 2021
2 parents d012130 + 9542fc8 commit bccce12
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ jobs:
run: |
cd datagateway-api && poetry run python -m util.icat_db_generator -s 4 -y 3
# Run each Nox tests session
# Run Nox tests session, saves and uploads a coverage report to codecov
- name: Run Nox tests session
if: always()
run: nox -s tests -f datagateway-api/noxfile.py
run: nox -s tests -f datagateway-api/noxfile.py -- --cov=datagateway_api --cov-report=xml
- name: Upload code coverage report
if: matrix.python-version == '3.6'
uses: codecov/codecov-action@v1
with:
directory: ./datagateway-api

linting:
runs-on: ubuntu-16.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ config.json
.nox/
.python-version
.coverage
coverage.xml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[![Build Status](https://github.com/ral-facilities/datagateway-api/workflows/CI/badge.svg?branch=master)](https://github.com/ral-facilities/datagateway-api/actions?query=workflow%3A%22CI%22)
[![Codecov](https://codecov.io/gh/ral-facilities/datagateway-api/branch/master/graph/badge.svg)](https://codecov.io/gh/ral-facilities/datagateway-api)



# DataGateway API
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pytest-cov = "^2.10.1"
pytest-icdiff = "^0.5"

[tool.poetry.scripts]
datagateway-api = "datagateway_api.src.main:run_api"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit bccce12

Please sign in to comment.