Skip to content

Commit

Permalink
Updated GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
leifeld committed Aug 19, 2024
1 parent 87721a4 commit 82cc74a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 19 deletions.
55 changes: 36 additions & 19 deletions .github/workflows/build-check-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,32 +154,49 @@ jobs:
working-directory: rDNA/rDNA
upload-snapshots: true

rDNA-coverage:
needs: rDNA
rDNA-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: rDNA

- uses: r-lib/actions/setup-r@v2
with:
r-version: release

- name: Restore R Packages
uses: actions/cache@v3
with:
path: ~/.cache/R
key: ${{ runner.os }}-r-rDNA-coverage-${{ hashFiles('**/DESCRIPTION') }}-v1

- name: Install Dependencies
run: |
install.packages('remotes')
remotes::install_deps(dependencies = TRUE)
install.packages('covr')
key: ${{ runner.os }}-r-rDNA-test-${{ hashFiles('**/DESCRIPTION') }}-v1

- name: Run Coverage
run: |
Rscript -e 'pkg_tarball <- list.files(pattern = "*.tar.gz", full.names = TRUE); covr::codecov(path = pkg_tarball)'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
working-directory: rDNA/rDNA
extra-packages: |
any::covr
any::ggplot2
any::igraph
any::ggraph
any::askpass
any::cluster
any::sna
any::ggrepel
any::coda
any::MCMCpack
any::tidygraph
any::heatmaply
any::factoextra
any::MASS
any::pbmcapply
- uses: gradle/wrapper-validation-action@v1

- name: Restore Gradle Cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}-v1

- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
- name: Execute Gradle build for rDNA
run: ./gradlew :rDNA:build
- name: Execute Gradle rDNATest Task
run: ./gradlew :rDNA:rDNATest
10 changes: 10 additions & 0 deletions rDNA/rDNA/tests/testthat/test-backbone.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ context("backbone")

test_that("Penalized backbone works", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_init()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
Expand Down Expand Up @@ -39,6 +40,7 @@ test_that("Penalized backbone works", {

test_that("Plot method works for backbones with penalty", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "penalty",
Expand All @@ -64,6 +66,7 @@ test_that("Plot method works for backbones with penalty", {

test_that("Autoplot method works for backbones with penalty", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "penalty",
Expand All @@ -86,6 +89,7 @@ test_that("Autoplot method works for backbones with penalty", {

test_that("Fixed backbone works", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "fixed",
Expand Down Expand Up @@ -122,6 +126,7 @@ test_that("Fixed backbone works", {

test_that("Plot method works for fixed backbone size", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "fixed",
Expand All @@ -147,6 +152,7 @@ test_that("Plot method works for fixed backbone size", {

test_that("Autoplot method works for backbones with fixed size", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "fixed",
Expand All @@ -169,6 +175,7 @@ test_that("Autoplot method works for backbones with fixed size", {

test_that("Nested backbone works", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "nested",
Expand Down Expand Up @@ -196,6 +203,7 @@ test_that("Nested backbone works", {

test_that("Plot method works for nested backbone", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "nested",
Expand All @@ -219,6 +227,7 @@ test_that("Plot method works for nested backbone", {

test_that("Autoplot method works for nested backbones", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_backbone(method = "nested",
Expand All @@ -238,6 +247,7 @@ test_that("Autoplot method works for nested backbones", {

test_that("Evaluate backbone solution works", {
testthat::skip_on_cran()
testthat::skip_on_ci()
samp <- dna_sample()
dna_openDatabase(samp, coderId = 1, coderPassword = "sample")
b <- dna_evaluateBackboneSolution(
Expand Down

0 comments on commit 82cc74a

Please sign in to comment.