Run R check as cran on action. [skip ci] (#6371)
Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
parent
43efadea2e
commit
a5cfa7841e
44
.github/workflows/main.yml
vendored
44
.github/workflows/main.yml
vendored
@ -7,7 +7,7 @@ name: XGBoost-CI
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
R_PACKAGES: c('XML', 'igraph', 'data.table', 'magrittr', 'stringi', 'ggplot2', 'DiagrammeR', 'Ckmeans.1d.dp', 'vcd', 'testthat', 'lintr', 'knitr', 'rmarkdown', 'e1071', 'cplm', 'devtools')
|
R_PACKAGES: c('XML', 'igraph', 'data.table', 'magrittr', 'stringi', 'ggplot2', 'DiagrammeR', 'Ckmeans.1d.dp', 'vcd', 'testthat', 'lintr', 'knitr', 'rmarkdown', 'e1071', 'cplm', 'devtools', 'float')
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
@ -310,3 +310,45 @@ jobs:
|
|||||||
- name: Test R
|
- name: Test R
|
||||||
run: |
|
run: |
|
||||||
python tests/ci_build/test_r_package.py --compiler="${{ matrix.config.compiler }}" --build-tool="${{ matrix.config.build }}"
|
python tests/ci_build/test_r_package.py --compiler="${{ matrix.config.compiler }}" --build-tool="${{ matrix.config.build }}"
|
||||||
|
|
||||||
|
test-R-CRAN:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {r: 'release'}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
|
- uses: r-lib/actions/setup-r@master
|
||||||
|
with:
|
||||||
|
r-version: ${{ matrix.config.r }}
|
||||||
|
|
||||||
|
- uses: r-lib/actions/setup-tinytex@master
|
||||||
|
|
||||||
|
- name: Cache R packages
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.R_LIBS_USER }}
|
||||||
|
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('R-package/DESCRIPTION') }}
|
||||||
|
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-2-
|
||||||
|
|
||||||
|
- name: Install system packages
|
||||||
|
run: |
|
||||||
|
sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev libssh2-1-dev libgit2-dev
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: Rscript {0}
|
||||||
|
run: |
|
||||||
|
install.packages(${{ env.R_PACKAGES }},
|
||||||
|
repos = 'http://cloud.r-project.org',
|
||||||
|
dependencies = c('Depends', 'Imports', 'LinkingTo'))
|
||||||
|
|
||||||
|
- name: Check R Package
|
||||||
|
run: |
|
||||||
|
make Rcheck
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user