1- on : [push, pull_request]
1+ on :
2+ push :
3+ pull_request :
4+ types : [opened, synchronize, reopened]
25
36name : R-CMD-check
47
@@ -17,43 +20,68 @@ jobs:
1720 - { os: windows-latest, r: 'devel'}
1821 - { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
1922 - { os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
23+
2024 env :
2125 R_REMOTES_NO_ERRORS_FROM_WARNINGS : true
22- PIP_NO_WARN_SCRIPT_LOCATION : false
26+ RSPM : ${{ matrix.config.rspm }}
27+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
2328
2429 steps :
25- - uses : actions/checkout@v1
30+ - uses : actions/checkout@v2
2631
2732 - uses : r-lib/actions/setup-r@master
33+ with :
34+ r-version : ${{ matrix.config.r }}
2835
2936 - uses : r-lib/actions/setup-pandoc@master
3037
38+ - name : Query dependencies
39+ run : |
40+ install.packages('remotes')
41+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
42+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
43+ shell : Rscript {0}
44+
3145 - name : Cache R packages
3246 if : runner.os != 'Windows'
3347 uses : actions/cache@v1
3448 with :
3549 path : ${{ env.R_LIBS_USER }}
36- key : ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
50+ key : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
51+ restore-keys : ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
3752
3853 - name : Install system dependencies
3954 if : runner.os == 'Linux'
4055 env :
4156 RHUB_PLATFORM : linux-x86_64-ubuntu-gcc
4257 run : |
43- Rscript -e "install.packages('remotes')" -e " remotes::install_github('r-hub/sysreqs')"
58+ Rscript -e "remotes::install_github('r-hub/sysreqs')"
4459 sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
4560 sudo -s eval "$sysreqs"
61+
4662 - name : Install dependencies
47- run : Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')"
63+ run : |
64+ remotes::install_deps(dependencies = TRUE)
65+ remotes::install_cran("rcmdcheck")
66+ shell : Rscript {0}
4867
49- - name : Install TensorFlow
68+ - name : Session info
5069 run : |
51- Rscript -e "remotes::install_github('rstudio/reticulate') # TODO remove when reticulate 1.14 is on CRAN"
52- Rscript -e "reticulate::install_miniconda()"
53- Rscript -e "reticulate::conda_create('r-reticulate', packages = 'python==3.6.9')"
54- Rscript -e "tensorflow::install_tensorflow(version='1.14.0')"
70+ options(width = 100)
71+ pkgs <- installed.packages()[, "Package"]
72+ sessioninfo::session_info(pkgs, include_base = TRUE)
73+ shell : Rscript {0}
74+
5575 - name : Check
56- run : Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
76+ env :
77+ _R_CHECK_CRAN_INCOMING_ : false
78+ run : rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
79+ shell : Rscript {0}
80+
81+ - name : Show testthat output
82+ if : always()
83+ run : find check -name 'testthat.Rout*' -exec cat '{}' \; || true
84+ shell : bash
5785
5886 - name : Upload check results
5987 if : failure()
0 commit comments