Skip to content

Merge pull request #467 from ncss-tech/fix-466 #1832

Merge pull request #467 from ncss-tech/fix-466

Merge pull request #467 from ncss-tech/fix-466 #1832

Workflow file for this run

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 0 * * 6' # At 00:00 on Saturday
workflow_dispatch:
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-22.04, r: 'oldrel-1'}
env:
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
- name: Get branch name (push)
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
- name: Configure git
if: runner.os == 'Windows' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
run: |
git config user.email "github-actions@github.com"
git config user.name "github-actions"
git pull --no-rebase origin ${{ env.BRANCH_NAME }}
echo ${{ env.BRANCH_NAME }}
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
extra-repositories: "https://ncss-tech.r-universe.dev/"
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::remotes, RSQLite=?ignore-before-r=4.0.0, rvest=?ignore-before-r=4.1.0, odbc=?ignore-before-r=4.0.0, testthat=?ignore-before-r=4.0.0, local::., brownag/soilDBdata
# upgrade: 'TRUE' ## NB: required to force building of source packages
cache: always
cache-version: 1
needs: check
- name: Install aqp off GitHub (devel and 3.6 only)
if: matrix.config.r == 'devel' || matrix.config.r == '3.6'
run: |
remotes::install_github("ncss-tech/aqp", dependencies = NA, build = FALSE)
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true