Update R-CMD-check.yaml #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R-CMD-check | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
R-CMD-check: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.PAT_GITHUB }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R package dependencies | |
run: | | |
install.packages('remotes') | |
remotes::install_deps(dependencies = TRUE) | |
- name: Cache R packages | |
uses: actions/cache@v3 | |
with: | |
path: ${{ runner.temp }}/R/cache | |
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }} | |
restore-keys: ${{ runner.os }}-r- | |
- name: Install pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Run R CMD check | |
run: R CMD check --no-manual --as-cran . | |
- name: Test coverage | |
run: Rscript -e 'covr::codecov()' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload R CMD check results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: R-CMD-check-results | |
path: check-*.Rcheck/ |