Skip to content

Commit

Permalink
yaml cmd check
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapereirabr committed Oct 21, 2024
1 parent c22776c commit a7167e2
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on:
push:
paths:
- r-package/**
- .github/workflows/R-CMD-check.yaml
branches:
- main
- master
- dev
pull_request:
paths:
- r-package/**
branches:
- main
- master
- dev

Expand All @@ -29,6 +32,7 @@ jobs:
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'oldrel'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
Expand All @@ -39,16 +43,13 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

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

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

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

- name: Java setup
uses: actions/setup-java@v2
Expand All @@ -74,22 +75,36 @@ jobs:

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: brew install gdal proj
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
working-directory: r-package

- name: Install macOS system dependencies
if: runner.os == 'macos'
run: brew install gdal proj
- name: Install system dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config gdal proj geos
working-directory: r-package

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
working-directory: r-package

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
working-directory: r-package

- uses: r-lib/actions/check-r-package@v2
- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
upload-snapshots: true

name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

0 comments on commit a7167e2

Please sign in to comment.