Skip to content

Commit

Permalink
Merge pull request #430 from Appsilon/fix-failing-ci
Browse files Browse the repository at this point in the history
Fix failing ci
  • Loading branch information
osenan committed Jan 30, 2023
2 parents 720425d + cb165d4 commit 9b1de73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
56 changes: 13 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,63 +14,33 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release', cran: "https://demo.rstudiopm.com/all/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'release', cran: "https://demo.rstudiopm.com/all/__linux__/bionic/latest"}
- {os: ubuntu-18.04, r: 'oldrel', cran: "https://demo.rstudiopm.com/all/__linux__/bionic/latest"}
- {os: ubuntu-22.04, r: 'devel'}
- {os: ubuntu-22.04, r: 'release'}
- {os: ubuntu-22.04, r: 'oldrel'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
CRAN: ${{ matrix.config.cran }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- uses: r-lib/actions/setup-pandoc@master
- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: Rscript -e "install.packages('remotes')" -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)"

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-

- name: Install system dependencies
if: runner.os == 'Linux'
uses: r-lib/actions/setup-r-dependencies@v1
- name: Install R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck

- name: Install vctrs
if: runner.os == 'Windows'
run: Rscript -e "remotes::install_cran('vctrs')"
extra-packages: local::. # Necessary to avoid object usage linter errors.

- name: Install vctrs
if: runner.os == 'macos'
run: Rscript -e "remotes::install_cran('Rcpp')"

- name: Install dependencies
run: Rscript -e "library(remotes)" -e "update(readRDS('depends.Rds'))" -e "remotes::install_cran('rcmdcheck')"

- name: Check
run: Rscript -e "rcmdcheck::rcmdcheck(args = c('--no-manual', '--as-cran'), error_on = 'error', check_dir = 'check')"

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- name: R CMD check
if: always()
uses: r-lib/actions/check-r-package@v2

- name: Test coverage
if: matrix.config.os == 'ubuntu-18.04' && matrix.config.r == 'release'
if: matrix.config.os == 'ubuntu-22.04' && matrix.config.r == 'release'
run: |
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ Suggests:
leaflet,
plotly,
rmarkdown,
markdown
markdown,
rcmdcheck
RoxygenNote: 7.2.1

0 comments on commit 9b1de73

Please sign in to comment.