-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (39 loc) · 1.24 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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
paths:
- '**/test-coverage.yaml'
- 'R/**'
- 'tests/**'
- 'DESCRIPTION'
- 'NAMESPACE'
pull_request:
branches: [main, master]
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NOT_CRAN: true
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- name: Install Linux dependencies
run: sudo apt-get install -yq libglu1-mesa-dev libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libfftw3-dev
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
- name: Test coverage
shell: Rscript {0}
run: |
token <- Sys.getenv("CODECOV_TOKEN", "")
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"),
token = if (token != "") token
)