Skip to content

Commit

Permalink
Merge pull request #899: Include functional tests in code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin authored May 24, 2022
2 parents ea89ece + 072404e commit 6f3291d
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 13 deletions.
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

0 comments on commit 6f3291d

Please sign in to comment.