Skip to content

Commit

Permalink
Merge pull request #362 from OuhscBbmc/gh-actions-try
Browse files Browse the repository at this point in the history
Trying new variations of GitHub Actions builds
  • Loading branch information
wibeasley authored Nov 5, 2021
2 parents ae2c769 + 05d0d5a commit 8a1a012
Showing 1 changed file with 21 additions and 49 deletions.
70 changes: 21 additions & 49 deletions .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,68 +20,40 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
# config:
# - {os: ubuntu-latest, r: 'release'}
# - {os: macOS-latest, r: 'release', http-user-agent: 'release', ONLY_READ_TESTS: true}
# - {os: windows-latest, r: 'release'}
os: [ubuntu-latest]
# os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
# include:
# - os: ubuntu-latest
# - os: macos-latest
# ONLY_READ_TESTS: true

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- uses: r-lib/actions/setup-pandoc@master
- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
- uses: r-lib/actions/setup-r@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
# r-version: ${{ matrix.config.r }}
# http-user-agent: ${{ matrix.config.http-user-agent }}
# ONLY_READ_TESTS: ${{ matrix.config.ONLY_READ_TESTS }}
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck

- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v1
# with:
# ONLY_READ_TESTS: ${{ matrix.config.ONLY_READ_TESTS }}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
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: Test coverage
run: covr::codecov()
Expand Down

0 comments on commit 8a1a012

Please sign in to comment.