From b61423ea10f07466827f25b64523f276e0880d64 Mon Sep 17 00:00:00 2001 From: christophe dervieux Date: Wed, 2 Jun 2021 14:34:59 +0200 Subject: [PATCH] Add a workflow to test Pandoc nighly --- .github/workflows/check-pandoc-daily.yaml | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/check-pandoc-daily.yaml diff --git a/.github/workflows/check-pandoc-daily.yaml b/.github/workflows/check-pandoc-daily.yaml new file mode 100644 index 0000000000..55e47a1553 --- /dev/null +++ b/.github/workflows/check-pandoc-daily.yaml @@ -0,0 +1,110 @@ +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + workflow_dispatch: + schedule: + - cron: '37 9 * * *' + +name: R-CMD-check-daily-pandoc + +jobs: + check: + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) [Pandoc ${{ matrix.config.pandoc }}] + + strategy: + fail-fast: false + matrix: + config: + - {os: windows-latest} + - {os: macOS-latest} + - {os: ubuntu-18.04, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + id: install-r + + - name: change temp dir + if: runner.os == 'Windows' + run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV + shell: bash + + - name: install pandoc devel + uses: cderv/actions/setup-pandoc-nightly@nightly-pandoc + + - uses: r-lib/actions/setup-tinytex@v1 + env: + # install full prebuilt version + TINYTEX_INSTALLER: TinyTeX + + - name: Add some R options for later steps + run: | + cat("\noptions(tinytex.verbose = TRUE)\n", file = "~/.Rprofile", append = TRUE) + cat(readLines("~/.Rprofile"), sep = "\n") + shell: Rscript {0} + + - name: Install pak and query dependencies + run: | + install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") + saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") + shell: Rscript {0} + + - name: Restore R package cache + uses: actions/cache@v2 + with: + path: | + ${{ env.R_LIBS_USER }}/* + !${{ env.R_LIBS_USER }}/pak + key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} + restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1- + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + pak::local_system_requirements(execute = TRUE) + pak::pkg_system_requirements("rcmdcheck", execute = TRUE) + shell: Rscript {0} + + - name: Install dependencies + run: | + pak::local_install_dev_deps(upgrade = TRUE) + pak::pkg_install("rcmdcheck") + shell: Rscript {0} + + - name: Session info + run: | + options(width = 100) + pkgs <- .packages(TRUE) + sessioninfo::session_info(pkgs, include_base = TRUE) + rmarkdown::find_pandoc() + tinytex::tlmgr("--version") + tinytex::tl_pkgs() + shell: Rscript {0} + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_: false + _R_CHECK_TESTS_NLINES_: 0 + run: | + options(crayon.enabled = TRUE) + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Show testthat output + if: always() + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ matrix.config.os }}-results + path: check