Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include functional tests in code coverage #899

Merged
merged 3 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ jobs:
- run: pip install -e .[dev]
- run: conda info
- run: conda list
- run: pytest -c pytest.python3.ini --cov-report=xml --cov=augur
- run: pytest -c pytest.python3.ini --cov=augur
- run: cram --shell=/bin/bash tests/functional/*.t tests/builds/*.t
env:
AUGUR: coverage run -a ${{ github.workspace }}/bin/augur
COVERAGE_FILE: ${{ github.workspace }}/.coverage
COVERAGE_RCFILE: ${{ github.workspace }}/.coveragerc
- run: coverage xml
- run: bash tests/builds/runner.sh
- if: github.repository == 'nextstrain/augur' && matrix.python-version == '3.10' && matrix.biopython-version == ''
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion tests/builds/zika.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Running from the test data directory allows us to use relative paths that won't
$ TEST_DATA_DIR="$TESTDIR/zika"
$ mkdir -p "$TMP/out"
$ pushd "$TEST_DATA_DIR" > /dev/null
$ export AUGUR="../../../bin/augur"
$ export AUGUR="${AUGUR:-../../../bin/augur}"

Parse a FASTA whose defline contains metadata into separate sequence and metadata files.

Expand Down
2 changes: 1 addition & 1 deletion tests/builds/zika_compressed.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Running from the test data directory allows us to use relative paths that won't
$ TEST_DATA_DIR="$TESTDIR/zika"
$ mkdir -p "$TMP/out"
$ pushd "$TEST_DATA_DIR" > /dev/null
$ export AUGUR="../../../bin/augur"
$ export AUGUR="${AUGUR:-../../../bin/augur}"

Parse a FASTA whose defline contains metadata into separate sequence and metadata files.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ancestral.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur ancestral.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Infer ancestral sequences for the given tree and alignment.
The default is to infer ambiguous bases, so there should not be N bases in the inferred output sequences.
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/clades.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur clades.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Test augur clades with simple Zika input files and hierarchical clades.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/export_v2.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur export v2.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Minimal export

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/filter.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur filter.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Filter with exclude query for two regions that comprise all but one strain.
This filter should leave a single record from Oceania.
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/frequencies.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur frequencies.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Calculate KDE-based tip frequencies from a refined tree.
Timepoints used to estimate frequencies (i.e., "pivots") get calculated from the range of dates in the given metadata.
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/mask.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur mask.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Try masking a VCF without any specified mask.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/parse.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur parse.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Parse Zika sequences into sequences and metadata.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/refine.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur refine.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Try building a time tree.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/traits.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur traits.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Infer the ancestral region for a given tree and metadata.

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tree.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Integration tests for augur tree.

$ pushd "$TESTDIR" > /dev/null
$ export AUGUR="../../bin/augur"
$ export AUGUR="${AUGUR:-../../bin/augur}"

Try building a tree with IQ-TREE.

Expand Down