Skip to content

Commit

Permalink
Merge pull request #45 from broadinstitute/ct-coverage-update
Browse files Browse the repository at this point in the history
update coveralls action; bump actions python to 3.10
  • Loading branch information
tomkinsc committed Jun 4, 2024
2 parents 6178d2e + 58c1296 commit 29d0aaf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
21 changes: 21 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .coveragerc to control test coverage report
[run]
branch = True
omit = tools/conda-tools/*
disable_warnings =
module-not-imported
relative_files = True

[report]

exclude_lines =
pragma: no cover

#raise AssertionError
raise NotImplementedError

def __repr__
if self\.debug

if 0:
if __name__ == .__main__.:
15 changes: 7 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ jobs:
needs: build_docker
runs-on: ubuntu-20.04
env:
GITHUB_ACTIONS_PYTHON_VERSION: 3.8
PYTEST_ADDOPTS: "-rsxX -n 2 --durations=25 --fixture-durations=10 --junit-xml=pytest.xml --cov-report= --cov assembly --cov assemble"
GITHUB_ACTIONS_PYTHON_VERSION: "3.10"
PYTEST_ADDOPTS: "-rsxX --durations=25 --fixture-durations=10 --junit-xml=pytest.xml --cov-config=.coveragerc --cov-report xml:coverage.xml --cov-report= --cov assembly --cov assemble"
steps:
- name: checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -186,12 +186,11 @@ jobs:
mkdir coverage
- name: test with docker
run: |
docker run -e _JAVA_OPTIONS -e PYTEST_ADDOPTS -v `pwd`/coverage:/coverage -v `pwd`/test:/opt/viral-ngs/source/test --entrypoint /bin/bash $DOCKER_TAG -c 'set -e; cd /opt/viral-ngs/source; pytest test/unit; cp .coverage /coverage'
- name: run coveralls
run: |
mv coverage/.coverage .
pip install coveralls>=1.3.0
coveralls --service=github
docker run -e _JAVA_OPTIONS -e PYTEST_ADDOPTS -v `pwd`/.coveragerc:/opt/viral-ngs/source/.coveragerc -v `pwd`/coverage:/coverage -v `pwd`/test:/opt/viral-ngs/source/test --entrypoint /bin/bash $DOCKER_TAG -c 'set -e; cd /opt/viral-ngs/source; pytest -n $(nproc) test/unit; cp coverage.xml /coverage;'
- name: Run coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage/coverage.xml

## note: this test_docs job does not actually produce the output on readthedocs
## readthedocs does its own build trigger. this job exists simply to alert us
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ htmlcov/
nosetests.xml
pytest.xml
coverage.xml
.coverage*
.coverage
coverage/

test/input/TestVPhaser2/in.bam.bti

Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[![Docker Repository on Quay](https://quay.io/repository/broadinstitute/viral-assemble/status "Docker Repository on Quay")](https://quay.io/repository/broadinstitute/viral-assemble)
[![Build Status](https://github.com/broadinstitute/viral-assemble/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/broadinstitute/viral-assemble/actions)
[![Documentation Status](https://readthedocs.org/projects/viral-assemble/badge/?version=latest)](https://viral-assemble.readthedocs.io/en/latest/?badge=latest)
<!--
[![broad-viral-badge](https://img.shields.io/badge/install%20from-broad--viral-green.svg?style=flat-square)](https://anaconda.org/broad-viral/viral-ngs)
[![Coverage Status](https://coveralls.io/repos/broadinstitute/viral-ngs/badge.png)](https://coveralls.io/r/broadinstitute/viral-ngs)
[![Code Health](https://landscape.io/github/broadinstitute/viral-ngs/master/landscape.svg?style=flat)](https://landscape.io/github/broadinstitute/viral-ngs)
-->
[![Coverage Status](https://coveralls.io/repos/github/broadinstitute/viral-assemble/badge.svg)](https://coveralls.io/github/broadinstitute/viral-assemble)

viral-assemble
==============
Expand Down
4 changes: 4 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def pytest_configure(config):
reporter = FixtureReporter(config)
config.pluginmanager.register(reporter, 'fixturereporter')

config.addinivalue_line(
"markers", "slow: marks tests as slow (deselect with '-m \"not slow\"')"
)


def pytest_collection_modifyitems(config, items):
if config.getoption("--runslow"):
Expand Down

0 comments on commit 29d0aaf

Please sign in to comment.