Skip to content

attempt mitigating occasional GH actions failures #5

attempt mitigating occasional GH actions failures

attempt mitigating occasional GH actions failures #5

# https://github.com/r-lib/actions/tree/master/examples#standard-ci-workflow
#
# note: update
# https://github.com/rfhb/ctrdata/settings/secrets/actions/CACHE_VERSION
on: [push, pull_request, workflow_dispatch]
name: R-CMD-CHECK-win-macos-linux-duckdb-mongodb-sqlite-postgres
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-2022, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'oldrel'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
# error installing dependencies under devel
#- {os: macOS-latest, r: 'devel'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
AT_HOME: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GHPAT }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- 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: Install dependencies
run: |
utils::install.packages("DBI")
remotes::install_github("r-dbi/RSQLite")
utils::install.packages("duckdb", repos = "https://duckdb.r-universe.dev")
remotes::install_github(repo = "ropensci/nodbi", ref = "reimplementation_end_2023")
remotes::install_deps(dependencies = TRUE)
remotes::install_cran(c("rcmdcheck", "covr"))
shell: Rscript {0}
- uses: ankane/setup-mongodb@v1
- uses: ankane/setup-postgres@v1
with:
postgres-version: 14
database: test
- name: Test coverage
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
# covr::codecov() never ends under Windows
# covr::codecov() uses environment variable CODECOV_TOKEN
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
- name: Upload failed check results
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check