Skip to content

Commit fb84cec

Browse files
authored
Update with-auth.yaml (#115)
1 parent c9c5843 commit fb84cec

File tree

1 file changed

+23
-34
lines changed

1 file changed

+23
-34
lines changed

.github/workflows/with-auth.yaml

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,55 @@ on:
1212
schedule:
1313
- cron: '0 12 * * *'
1414

15-
name: R-CMD-check
15+
name: with-auth
1616

1717
jobs:
18-
R-CMD-check:
18+
with-auth:
1919
if: github.event.pull_request.head.repo.full_name == github.repository
20-
runs-on: ${{ matrix.config.os }}
21-
22-
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
23-
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
config:
28-
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", vcrturnoff: 'true', auth: MEETUPR_PWD}
20+
runs-on: macOS-latest
2921

3022
env:
3123
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32-
RSPM: ${{ matrix.config.rspm }}
3324
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
34-
VCR_TURN_OFF: ${{ matrix.config.vcrturnoff }}
35-
MEETUPR_PWD: ${{ secrets[matrix.config.auth] }}
25+
VCR_TURN_OFF: true
26+
MEETUPR_PWD: ${{ secrets.MEETUPR_PWD }}
3627

3728
steps:
3829
- uses: actions/checkout@v2
3930

4031
- uses: r-lib/actions/setup-r@v1
32+
id: install-r
4133
with:
42-
r-version: ${{ matrix.config.r }}
34+
r-version: release
4335

4436
- uses: r-lib/actions/setup-pandoc@v1
4537

46-
- name: Query dependencies
38+
- name: Install pak and query dependencies
4739
run: |
48-
install.packages('remotes')
49-
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")
40+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
41+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
5142
shell: Rscript {0}
52-
43+
5344
- name: Cache R packages
54-
if: runner.os != 'Windows'
5545
uses: actions/cache@v2
5646
with:
5747
path: ${{ env.R_LIBS_USER }}
58-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
59-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
60-
61-
- name: Install system dependencies
62-
if: runner.os == 'Linux'
63-
run: |
64-
while read -r cmd
65-
do
66-
eval sudo $cmd
67-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
68-
48+
key: mac-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
49+
restore-keys: mac-${{ steps.install-r.outputs.installed-r-version }}-1-
50+
6951
- name: Install dependencies
7052
run: |
71-
remotes::install_deps(dependencies = TRUE)
72-
remotes::install_cran("rcmdcheck")
53+
pak::local_install_dev_deps(upgrade = TRUE)
54+
pak::pkg_install("rcmdcheck")
7355
shell: Rscript {0}
7456

57+
- name: Session info
58+
run: |
59+
options(width = 100)
60+
pkgs <- installed.packages()[, "Package"]
61+
sessioninfo::session_info(pkgs, include_base = TRUE)
62+
shell: Rscript {0}
63+
7564
- name: Check
7665
env:
7766
_R_CHECK_CRAN_INCOMING_REMOTE_: false

0 commit comments

Comments
 (0)