Skip to content

Commit 4fc2e2b

Browse files
committed
next test
1 parent fd7e169 commit 4fc2e2b

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
11+
name: check
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-20.04
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@v1
22+
23+
- uses: r-lib/actions/setup-pandoc@v1
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell: Rscript {0}
31+
32+
- name: Cache R packages
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ env.R_LIBS_USER }}
36+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
- name: Install dependencies
40+
run: |
41+
repos <- c("https://cloud.r-project.org","https://rse.pik-potsdam.de/r/packages/")
42+
install.packages(c("remotes","lucode2"), repos=repos)
43+
remotes::install_deps(dependencies = TRUE, repos=repos)
44+
remotes::install_cran("covr")
45+
shell: Rscript {0}
46+
47+
- name: Test coverage
48+
run: covr::codecov()
49+
shell: Rscript {0}
50+
51+
- name: Validation key
52+
run: if(!lucode2:::validkey()$valid) stop("Invalid build key!")
53+
shell: Rscript {0}
54+

0 commit comments

Comments
 (0)