Skip to content

add sf

add sf #115

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
id: install-r
- 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: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
#pak::pkg_sysreqs(upgrade = TRUE)
pak::pkg_sysreqs("covr", upgrade = TRUE)
shell: Rscript {0}
- name: Install system dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config gdal proj geos
# Install libgit2
brew install libgit2
- name: "[Stage] [macOS] Install system libs for pkgdown"
if: runner.os == 'macOS' && matrix.config.pkgdown != ''
run: brew install harfbuzz fribidi
- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("covr")
shell: Rscript {0}
- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}