Skip to content

Commit 0cadb0e

Browse files
committed
Update to latest GitHub Actions workflows
1 parent 3835a12 commit 0cadb0e

File tree

7 files changed

+65
-90
lines changed

7 files changed

+65
-90
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

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

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,77 +12,88 @@ jobs:
1212
R-CMD-check:
1313
runs-on: ${{ matrix.config.os }}
1414

15-
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) ${{ matrix.config.locale }}
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
1616

1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
config:
21+
- {os: macOS-latest, r: 'release'}
22+
- {os: windows-latest, r: 'release'}
2123
- {os: windows-latest, r: '3.6'}
22-
- {os: macOS-latest, r: '3.6'}
23-
- {os: macOS-latest, r: 'devel'}
24-
- {os: ubuntu-16.04, r: '3.2', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
25-
- {os: ubuntu-16.04, r: '3.3', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
26-
- {os: ubuntu-16.04, r: '3.4', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
27-
- {os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
28-
- {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
29-
- {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest", locale: 'en_US'}
24+
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
25+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26+
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27+
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28+
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
29+
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
30+
- {os: ubuntu-16.04, r: '3.6', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest", locale: 'en_US'}
3031

3132
env:
3233
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
33-
CRAN: ${{ matrix.config.cran }}
34+
RSPM: ${{ matrix.config.rspm }}
35+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3436

3537
steps:
3638
- uses: actions/checkout@v2
3739

38-
- name: Set locale
39-
if: matrix.config.locale == 'en_US'
40-
run: |
41-
sudo locale-gen en_US
42-
echo "::set-env name=LC_ALL::en_US"
43-
4440
- uses: r-lib/actions/setup-r@master
4541
with:
4642
r-version: ${{ matrix.config.r }}
43+
http-user-agent: ${{ matrix.config.http-user-agent }}
4744

4845
- uses: r-lib/actions/setup-pandoc@master
4946

5047
- name: Query dependencies
5148
run: |
5249
install.packages('remotes')
53-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
50+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
51+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
5452
shell: Rscript {0}
5553

5654
- name: Cache R packages
5755
if: runner.os != 'Windows'
5856
uses: actions/cache@v1
5957
with:
6058
path: ${{ env.R_LIBS_USER }}
61-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
62-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
59+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
60+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
6361

6462
- name: Install system dependencies
6563
if: runner.os == 'Linux'
66-
env:
67-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
6864
run: |
69-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
70-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
71-
sudo -s eval "$sysreqs"
65+
while read -r cmd
66+
do
67+
eval sudo $cmd
68+
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "16.04"), sep = "\n")')
7269
7370
- name: Install dependencies
7471
run: |
7572
remotes::install_deps(dependencies = TRUE)
7673
remotes::install_cran("rcmdcheck")
7774
shell: Rscript {0}
7875

76+
- name: Session info
77+
run: |
78+
options(width = 100)
79+
pkgs <- installed.packages()[, "Package"]
80+
sessioninfo::session_info(pkgs, include_base = TRUE)
81+
shell: Rscript {0}
82+
7983
- name: Check
80-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
84+
env:
85+
_R_CHECK_CRAN_INCOMING_: false
86+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
8187
shell: Rscript {0}
8288

89+
- name: Show testthat output
90+
if: always()
91+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
92+
shell: bash
93+
8394
- name: Upload check results
8495
if: failure()
85-
uses: actions/upload-artifact@master
96+
uses: actions/upload-artifact@main
8697
with:
8798
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
8899
path: check

.github/workflows/pkgdown.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ name: pkgdown
77
jobs:
88
pkgdown:
99
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1012
steps:
1113
- uses: actions/checkout@v2
1214

@@ -17,26 +19,28 @@ jobs:
1719
- name: Query dependencies
1820
run: |
1921
install.packages('remotes')
20-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
22+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
23+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
2124
shell: Rscript {0}
2225

2326
- name: Cache R packages
2427
uses: actions/cache@v1
2528
with:
2629
path: ${{ env.R_LIBS_USER }}
27-
key: macOS-r-3.6-${{ hashFiles('depends.Rds') }}
28-
restore-keys: macOS-r-3.6-
30+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
31+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
2932

3033
- name: Install dependencies
3134
run: |
32-
install.packages("remotes")
3335
remotes::install_deps(dependencies = TRUE)
34-
remotes::install_dev("pkgdown")
36+
install.packages("pkgdown")
3537
shell: Rscript {0}
3638

3739
- name: Install package
3840
run: R CMD INSTALL .
3941

4042
- name: Deploy package
41-
run: pkgdown::deploy_to_branch(new_process = FALSE)
42-
shell: Rscript {0}
43+
run: |
44+
git config --local user.email "[email protected]"
45+
git config --local user.name "GitHub Actions"
46+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
if: startsWith(github.event.comment.body, '/document')
88
name: document
99
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1012
steps:
1113
- uses: actions/checkout@v2
1214
- uses: r-lib/actions/pr-fetch@master
@@ -19,6 +21,8 @@ jobs:
1921
run: Rscript -e 'roxygen2::roxygenise()'
2022
- name: commit
2123
run: |
24+
git config --local user.email "[email protected]"
25+
git config --local user.name "GitHub Actions"
2226
git add man/\* NAMESPACE
2327
git commit -m 'Document'
2428
- uses: r-lib/actions/pr-push@master
@@ -28,6 +32,8 @@ jobs:
2832
if: startsWith(github.event.comment.body, '/style')
2933
name: style
3034
runs-on: macOS-latest
35+
env:
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3137
steps:
3238
- uses: actions/checkout@v2
3339
- uses: r-lib/actions/pr-fetch@master
@@ -40,13 +46,10 @@ jobs:
4046
run: Rscript -e 'styler::style_pkg()'
4147
- name: commit
4248
run: |
49+
git config --local user.email "[email protected]"
50+
git config --local user.name "GitHub Actions"
4351
git add \*.R
4452
git commit -m 'Style'
4553
- uses: r-lib/actions/pr-push@master
4654
with:
4755
repo-token: ${{ secrets.GITHUB_TOKEN }}
48-
# A mock job just to ensure we have a successful build status
49-
finish:
50-
runs-on: ubuntu-latest
51-
steps:
52-
- run: true

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ name: test-coverage
1111
jobs:
1212
test-coverage:
1313
runs-on: macOS-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1416
steps:
1517
- uses: actions/checkout@v2
1618

@@ -21,15 +23,16 @@ jobs:
2123
- name: Query dependencies
2224
run: |
2325
install.packages('remotes')
24-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
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")
2528
shell: Rscript {0}
2629

2730
- name: Cache R packages
2831
uses: actions/cache@v1
2932
with:
3033
path: ${{ env.R_LIBS_USER }}
31-
key: macOS-r-3.6-${{ hashFiles('depends.Rds') }}
32-
restore-keys: macOS-r-3.6-
34+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
3336

3437
- name: Install dependencies
3538
run: |

appveyor.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ coverage:
66
default:
77
target: auto
88
threshold: 1%
9+
informational: true
910
patch:
1011
default:
1112
target: auto
1213
threshold: 1%
14+
informational: true

0 commit comments

Comments
 (0)