actions
actions copied to clipboard
rchk example does not install R
The example provided here: https://github.com/r-lib/actions/blob/v2/run-rchk/README.md does not install R, thus leading to the error:
Run r-lib/actions/setup-r-dependencies@v2
Run # Set site library path
Set site library path
Run # Install pak
Install pak
sudo: R: command not found
Error: Process completed with exit code 1.
As seen here: https://github.com/MLopez-Ibanez/eaf/actions/runs/5113454724/jobs/9192883046
The following setup does seem to work:
rchk:
name: rchk ${{ matrix.config.os }} (${{ matrix.config.r }})
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
container:
image: rhub/ubuntu-rchk
options: --user=root
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/run-rchk@v2
with:
setup-only: true
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- uses: r-lib/actions/run-rchk@v2
with:
run-only: true