Skip to content

Commit b4eec19

Browse files
committed
Align with pillar
1 parent 57c3c98 commit b4eec19

File tree

2 files changed

+58
-11
lines changed

2 files changed

+58
-11
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
config:
2121
- {os: macOS-latest, r: 'devel'}
2222
- {os: macOS-latest, r: 'release'}
23-
- {os: windows-latest, r: '4.0'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: windows-latest, r: 'oldrel'}
2425
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2526
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2627
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
@@ -31,6 +32,7 @@ jobs:
3132
env:
3233
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3334
RSPM: ${{ matrix.config.rspm }}
35+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3436

3537
steps:
3638
- uses: actions/checkout@v2
@@ -45,15 +47,16 @@ jobs:
4547
run: |
4648
install.packages('remotes')
4749
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
50+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
4851
shell: Rscript {0}
4952

5053
- name: Cache R packages
5154
if: runner.os != 'Windows'
5255
uses: actions/cache@v1
5356
with:
5457
path: ${{ env.R_LIBS_USER }}
55-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
56-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
58+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
59+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5760

5861
- name: Install system dependencies
5962
if: runner.os == 'Linux'
@@ -65,8 +68,10 @@ jobs:
6568
sudo -s eval "$sysreqs"
6669
6770
- name: Install dependencies
68-
run:
69-
Rscript -e "library(remotes)" -e "deps <- readRDS('.github/depends.Rds')" -e "deps[['installed']] <- vapply(deps[['package']], remotes:::local_sha, character(1))" -e "update(deps)" -e "remotes::install_cran('rcmdcheck')"
71+
run: |
72+
remotes::install_deps(dependencies = TRUE)
73+
remotes::install_cran("rcmdcheck")
74+
shell: Rscript {0}
7075

7176
- name: Session info
7277
run: |
@@ -78,7 +83,8 @@ jobs:
7883
- name: Check
7984
env:
8085
_R_CHECK_CRAN_INCOMING_: false
81-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "note", check_dir = "check")
86+
RCMDCHECK_ERROR_ON: note
87+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = Sys.getenv("RCMDCHECK_ERROR_ON"), check_dir = "check")
8288
shell: Rscript {0}
8389

8490
- name: Show testthat output
@@ -92,8 +98,3 @@ jobs:
9298
with:
9399
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
94100
path: check
95-
96-
- name: Test coverage
97-
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
98-
run:
99-
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'

.github/workflows/test-coverage.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: macOS-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-r@master
20+
21+
- uses: r-lib/actions/setup-pandoc@master
22+
23+
- name: Query dependencies
24+
run: |
25+
install.packages('remotes')
26+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
28+
shell: Rscript {0}
29+
30+
- name: Cache R packages
31+
uses: actions/cache@v1
32+
with:
33+
path: ${{ env.R_LIBS_USER }}
34+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
36+
37+
- name: Install dependencies
38+
run: |
39+
install.packages(c("remotes"))
40+
remotes::install_deps(dependencies = TRUE)
41+
remotes::install_cran("covr")
42+
shell: Rscript {0}
43+
44+
- name: Test coverage
45+
run: covr::codecov()
46+
shell: Rscript {0}

0 commit comments

Comments
 (0)