Open ahl27 opened 4 weeks ago
Coverage is only calculated when no tests fail. When one or more tests fail or throw warnings, the summary looks like this:
This workflow result can be viewed here. It was created using tests that were artificially designed to fail/throw warnings, which have now been removed.
Note: coverage can be calculated if some tests throw warnings, but none fail. In this case, this table will be displayed along with coverage information.
More information on the tests that failed/warned is available in the workflow itself:
Summary
testthat::test_dir("tests/testthat")
New Workflow
This PR adds a GitHub Action workflow to automatically run unit tests and report overall coverage. The workflow starts a Linux VM, then evaluates test coverage on the default
Biostrings
branch as well as on the package with proposed changes in the PR. On completion, the action adds a status to the "Summary" pane of the check with the following statistics:This result is also uploaded as a GitHub-flavored Markdown file. Total runtime of the workflow is 9-12min. An example workflow can be seen here.
For reasons I don't entirely understand, the coverage reported here is sometimes different than what's reported if you upload the exact same source data to Codecov.io. Maybe there's some difference in how Codecov calculates percent coverage. Codecov.io isn't used because licensing makes things tricky (and potentially costly).
Note: it is possible to also add the results as a comment to the PR that triggered the workflow, but this requires a GitHub token with
pull-request: write
permissions, which I'm hesitant to include on a public repository.Note 2: this workflow will not run until a version of it is present on
Biostrings/devel
, so the results of the workflow won't be visible until this PR is merged. This workflow can be activated by merging an empty file.github/workflows/test-coverage.yaml
toBiostrings/devel
.The following files are currently ignored by the checker:
Minor changes to files
translate.R:16
has been elevated to an error becauseAA_ALPHABET
is now enforced.letter.R
are standardized, some additional error checking is added.mask
was scheduled to be deprecated in Biostrings 2.9. This function now throws a warning when it is used and will be removed in a subsequent release.man/XStringSetList-class.Rd
previously said that "DNAStringSetList
andAAStringSetList
are the only constructors", but the current version of Biostrings includesBStringSetList
andRNAStringSetList
constructors. This has been updated.replaceAt.R
wrapped inif(FALSE){...}
brackets. These have been moved to the unit tests, and performance/timing tests have been removed.replaceAmbiguities
now checks to ensure input is one ofDNAString
,RNAString
, or theXStringSet
/XStringSetList
analogs. This previously caused some odd behavior with input of typeAAString
.make_AA_COLORED_LETTERS
has been removed.XStringViews-class.R
that was supposed to be suppressed in Bioc 2.12 has been suppressed.inst/unitTests
have been ported totestthat
when possible. Accordingly,run_unitTests.R
has been removed.Outstanding changes prior to merging this PR
inst/unitTests
devel
to ensure this workflow runs as expectedPlanned Future Changes
mask
warning can be elevated to an error in Bioc 3.20, and then removed in 3.21.113