diff --git a/.github/workflows/R-CMD-check-devel.yaml b/.github/workflows/R-CMD-check-devel.yaml new file mode 100644 index 0000000..f83e836 --- /dev/null +++ b/.github/workflows/R-CMD-check-devel.yaml @@ -0,0 +1,154 @@ +on: + workflow_dispatch: # enable "run workflow" button + # pull_request: + # branches: + # - devel + +name: R-CMD-check-devel + +jobs: + R-CMD-check-devel: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }} - ${{ matrix.config.bioc }}) + + strategy: + fail-fast: false + matrix: + config: + - { os: windows-latest, r: 'devel', bioc: 'devel'} + - { os: macOS-latest, r: 'devel', bioc: 'devel', curlConfigPath: '/usr/bin/'} + - { os: ubuntu-latest, r: 'devel', bioc: 'devel'} + - { os: windows-latest, r: 'release', bioc: 'devel'} + # - { os: ubuntu-16.04, r: 'devel', bioc: 'devel', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest", deploy = 'no'} + # - { os: ubuntu-latest, r: 'devel', image: 'bioconductor/bioconductor_docker:devel', deploy: 'no'} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + CRAN: ${{ matrix.config.cran }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CURL_CONFIG: ${{ matrix.config.curlConfigPath }}curl-config + cache-version: v2 + + steps: + - name: checkout branch + uses: actions/checkout@v3 + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + if: matrix.config.image == null + with: + r-version: ${{ matrix.config.r }} + + - name: R version + run: Rscript -e 'R.version' + + - name: Set up pandoc + uses: r-lib/actions/setup-pandoc@v2 + if: matrix.config.image == null + + - name: Install BiocManager, remotes and RCurl + run: | + install.packages(c('BiocManager', 'remotes', 'RCurl')) + BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, update = FALSE) + shell: Rscript {0} + + - name: Query dependencies + run: | + saveRDS(remotes::dev_package_deps(dependencies = TRUE, repos = c(getOption('repos'), BiocManager::repositories())), 'depends.Rds', version = 2) + shell: Rscript {0} + + - name: Cache R packages + if: runner.os != 'Windows' && matrix.config.image == null + uses: actions/cache@v4 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-${{ hashFiles('depends.Rds') }} + restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}- + + - name: Install Linux system dependencies + if: runner.os == 'Linux' + env: + RHUB_PLATFORM: linux-x86_64-ubuntu-gcc + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + pak-version: devel + + # - name: Install Linux system dependencies + # if: runner.os == 'Linux' + # env: + # RHUB_PLATFORM: linux-x86_64-ubuntu-gcc + # run: | + # sudo apt-get update && sudo apt-get -y install libharfbuzz-dev libfribidi-dev + # Rscript -e "remotes::install_github('r-hub/sysreqs')" + # sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") + # sudo -s eval "$sysreqs" + + - name: Install macOS system dependencies + if: runner.os == 'macOS' + run: | + brew install harfbuzz + brew install fribidi + brew install jpeg fftw + mkdir -p /Users/runner/.R + touch /Users/runner/.R/Makevars + echo 'export CPPFLAGS="-I/opt/homebrew/opt/jpeg/include"' >> /Users/runner/.R/Makevars + echo 'export LDFLAGS="-L/opt/homebrew/opt/jpeg/lib"' >> /Users/runner/.R/Makevars + echo 'export PKG_CONFIG_PATH="/opt/homebrew/opt/jpeg/lib/pkgconfig"' >> /Users/runner/.R/Makevars + Rscript -e 'BiocManager::install(c("GenomeInfoDbData"), type = "source")' + Rscript -e 'BiocManager::install(c("GenomicFeatures"), type = "source")' + + + - name: Install R package dependencies + run: | + local_deps <- remotes::local_package_deps(dependencies = TRUE) + deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories()) + print(deps) + BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]], Ncpu = 2L, ask = FALSE, update = FALSE) + remotes::install_cran('rcmdcheck', Ncpu = 2L) + shell: Rscript {0} + + - name: Session info + run: | + options(width = 100) + pkgs <- installed.packages()[, "Package"] + sessioninfo::session_info(pkgs, include_base = TRUE) + shell: Rscript {0} + + - name: Build, Install, Check + id: build-install-check + uses: grimbough/bioc-actions/build-install-check@v1 + + - name: Upload install log if the build/install/check step fails + if: always() && (steps.build-install-check.outcome == 'failure') + uses: actions/upload-artifact@v4 + with: + name: install-log + path: | + ${{ steps.build-install-check.outputs.install-log }} + + - name: Show testthat output (windows) + if: always() && runner.os == 'Windows' + run: | + type ${{ steps.build-install-check.outputs.check-dir }}\tests\testthat.Rout + shell: cmd + + - name: Show testthat output (non-windows) + if: always() && runner.os != 'Windows' + run: | + cat ${{ steps.build-install-check.outputs.check-dir }}/tests/testthat.Rout + shell: bash + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@master + with: + name: ${{ runner.os }}-results + path: ${{ steps.build-install-check.outputs.check-dir }} + + + + + diff --git a/DESCRIPTION b/DESCRIPTION index 4296449..bb52f1c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: eisaR Title: Exon-Intron Split Analysis (EISA) in R -Version: 1.25.2 +Version: 1.25.3 Authors@R: c(person("Michael", "Stadler", email = "michael.stadler@fmi.ch", role = c("aut", "cre")), person("Dimos", "Gaidatzis", email = "dimosthenis.gaidatzis@fmi.ch", role = "aut"), person("Lukas", "Burger", email = "lukas.burger@fmi.ch", role = "aut"), diff --git a/tests/testthat/test_runEISA.R b/tests/testthat/test_runEISA.R index a030e6a..1a767ba 100644 --- a/tests/testthat/test_runEISA.R +++ b/tests/testthat/test_runEISA.R @@ -65,6 +65,10 @@ test_that("runEISA() runs", { context("runEISA gives expected results") test_that("runEISA() gives expected results", { + # rbinom was fixed in R 4.7 - fix to 4.6 behavior to get reproducible + # simulated data across R versions + suppressWarnings(RNGversion("4.6")) + # construct artificial example fracIntron <- 0.2 ngenes <- 3000L