Skip to content

fix ci

fix ci #36

Workflow file for this run

# 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:
schedule:
- cron: 0 0 * * 1 # schedule to run at midnight on Monday each week
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: Documentation
jobs:
docs:
runs-on: ${{ matrix.config.os }}
name: docs
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'release', pkgs: 'all'}
env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_TIMINGS_: 10
_R_CHECK_CRAN_INCOMING_REMOTE_: false
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CI: true
NOT_CRAN: true
steps:
# configure git to prevent it from automatically converting line-endings
# this is important to avoid WARNINGS during CRAN checks
# that are false-positives, see:
# https://msmith.de/2020/03/12/r-cmd-check-github-actions.html
- name: Configure git
run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 4
extra-packages: |
any::rcmdcheck
any::remotes
any::XML
any::covr
any::urlchecker
needs: |
check
- name: Install spatial R packages
run: |
options(repos = "https://cloud.r-project.org/")
install.packages("sf")
install.packages("terra")
shell: Rscript {0}
- name: Session information
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
- name: Check URLs
if: runner.os == 'Linux' && matrix.config.r == 'release'
run: |
result <- urlchecker::url_check()
result <- result[result$Message != "OK", , drop = FALSE]
result <- result[result$URL != "https://www.bcassessment.ca/", , drop = FALSE]
result <- result[!startsWith(result$URL, "https://doi.org/"), , drop = FALSE]
if (nrow(result) > 0) {
print(result)
print(str(result))
stop("Invalid URLs detected")
}
shell: Rscript {0}