-
Notifications
You must be signed in to change notification settings - Fork 26
58 lines (48 loc) · 1.32 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
53
54
55
56
57
58
on:
push:
branches:
- main
pull_request:
branches:
- main
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSC_VERSION: 2022.09.0
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
CONNECTAPI_INTEGRATED: true
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, local::.
needs: coverage
- name: Setup test environment
run: |
connectapi:::build_test_env()
shell: Rscript {0}
- name: Test coverage
id: coverage
run: |
system(paste0("echo ::set-output name=OUTDIR::", Sys.getenv("R_SESSION_TMPDIR")))
tryCatch({
covr::codecov(clean = FALSE, quiet = FALSE)
}, error = function(e) {
message(e)
})
fs::dir_copy(Sys.getenv("R_SESSION_TMPDIR"), "/tmp/outputs")
shell: Rscript {0}
- name: Archive tempdir artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: tmpdir artifacts
path: |
/tmp/outputs