-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (44 loc) · 1.13 KB
/
test-coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
on:
push:
branches:
- main
pull_request:
branches:
- main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.7.3'
- name: install gdal
run: |
# install spatial dependencies
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install \
libudunits2-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
libharfbuzz-dev \
libfribidi-dev
- name: Install renv
shell: Rscript {0}
run: |
install.packages("renv")
- uses: actions/cache@v2
with:
path: ~/Library/Application Support/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Test coverage
shell: Rscript {0}
run: |
renv::restore()
covr::codecov()