54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: R-CMD-check
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
check:
|
|
name: R CMD check
|
|
runs-on: ubuntu-latest
|
|
container: rocker/r-ver:4.6
|
|
|
|
steps:
|
|
# Plain git checkout — no Node.js required, works in any container.
|
|
# gitea.token is automatically injected by the runner for auth.
|
|
- name: Check out code
|
|
env:
|
|
REPO_TOKEN: ${{ gitea.token }}
|
|
run: |
|
|
apt-get update -qq && apt-get install -y --no-install-recommends git
|
|
git config --global --add safe.directory "$PWD"
|
|
git init
|
|
git remote add origin \
|
|
"https://oauth2:${REPO_TOKEN}@gitea.civilytics.org/${{ gitea.repository }}.git"
|
|
git fetch --depth=1 origin "${{ gitea.sha }}"
|
|
git checkout FETCH_HEAD
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get install -y --no-install-recommends \
|
|
libcurl4-openssl-dev \
|
|
libssl-dev \
|
|
libxml2-dev \
|
|
libcairo2-dev \
|
|
libjpeg-dev \
|
|
libpng-dev \
|
|
libfontconfig1-dev \
|
|
libharfbuzz-dev \
|
|
libfribidi-dev \
|
|
libfreetype6-dev \
|
|
libtiff5-dev
|
|
|
|
- name: Install R dependencies
|
|
run: |
|
|
install.packages(c("remotes", "rcmdcheck"))
|
|
remotes::install_deps(dependencies = TRUE)
|
|
shell: Rscript {0}
|
|
|
|
- name: Run R CMD check
|
|
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning")
|
|
shell: Rscript {0}
|