Depend on 'beastier' v2.5 #280
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 16 * *" | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
strategy: | |
fail-fast: false | |
matrix: | |
install_beast2: [true, false] | |
os: [ubuntu-latest] | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v1 | |
- name: Install libgit2-dev | |
run: sudo apt install -qq libgit2-dev | |
- name: Install libmpfr-dev for Rmpfr | |
run: sudo apt install -qq libmpfr-dev | |
- name: Install libcurl4-openssl-dev | |
run: sudo apt install -qq libcurl4-openssl-dev | |
- name: Install libharfbuzz-dev libfribidi-dev | |
run: sudo apt install -qq libharfbuzz-dev libfribidi-dev | |
# from https://travis-ci.community/t/cannot-connect-to-java-from-r/9754/8 | |
- name: Fix rJava error | |
run: sudo $(which R) CMD javareconf | |
- name: Install dependencies | |
run: | | |
install.packages(c("remotes", "rcmdcheck")) | |
remotes::install_github("ropensci/beautier", ref = "develop") | |
remotes::install_github("ropensci/tracerer") | |
remotes::install_github("ropensci/beastier", ref = "develop") | |
remotes::install_github("ropensci/mauricer") | |
remotes::install_github("ropensci/babette") | |
remotes::install_github("ropensci/mcbette") | |
remotes::install_deps(dependencies = TRUE) | |
remotes::install_cran("rJava") | |
remotes::install_cran("rcmdcheck") | |
remotes::install_cran("covr") | |
remotes::install_cran("lintr") | |
remotes::install_github("MangoTheCat/goodpractice") | |
remotes::install_github("thijsjanzen/nodeSub") | |
remotes::install_github("richelbilderbeek/beastierinstall") | |
remotes::install_github("richelbilderbeek/mauricerinstall") | |
shell: Rscript {0} | |
- name: Install BEAST2 | |
env: | |
INSTALL_BEAST2_NS: ${{ matrix.install_beast2_ns }} | |
run: if [[ "$INSTALL_BEAST2_NS" == true ]]; then Rscript -e 'beastierinstall::install_beast2()'; fi | |
- name: Install BEAST2 NS package | |
env: | |
INSTALL_BEAST2_NS: ${{ matrix.install_beast2_ns }} | |
run: if [[ "$INSTALL_BEAST2_NS" == true ]]; then Rscript -e 'mauricerinstall::install_beast2_pkg("NS")'; fi | |
- name: Check | |
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the beautier .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "beautier")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the tracerer .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "tracerer")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the beastier .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "beastier")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the mauricer .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "mauricer")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the babette .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "babette")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the mcbette .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "mcbette")))) | |
shell: Rscript {0} | |
- name: Make sure that no files are created in the pirouette .cache folder | |
run: testthat::expect_equal(0, length(list.files(rappdirs::user_cache_dir(appname = "mcbette")))) | |
shell: Rscript {0} | |
# - name: Test coverage | |
# env: | |
# INSTALL_BEAST2: ${{ matrix.install_beast2 }} | |
# run: if [[ "$INSTALL_BEAST2" == true ]]; then Rscript -e 'covr::codecov()'; fi | |
- name: Install package | |
run: R CMD INSTALL . | |
- name: Lint | |
env: | |
INSTALL_BEAST2: ${{ matrix.install_beast2 }} | |
run: if [[ "$INSTALL_BEAST2" == false ]]; then Rscript -e 'lintr::lint_package()'; fi | |
- name: Report | |
run: mcbette::mcbette_report() | |
shell: Rscript {0} | |