Skip to content

Commit

Permalink
rewrite rchk action
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Oct 29, 2024
1 parent e86a8d9 commit 317ed85
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/rchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,34 @@ name: rchk

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]


jobs:
check:
rchk:
runs-on: ubuntu-latest
container:
image: ghcr.io/r-hub/containers/rchk:latest

steps:

- uses: actions/checkout@v4

- name: Install dependencies
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2

- run: R CMD build .

- run: docker pull kalibera/rchk:latest

- name: run rchk
run: |
R -q -e 'pak::pkg_install(c("deps::.", "any::rcmdcheck"), dependencies = TRUE)'
pkgtar=$(ls S7_*.tar.gz)
mkdir -p rchk/packages
mv $pkgtar rchk/packages/
cd rchk
docker run -v `pwd`/packages:/rchk/packages kalibera/rchk:latest /rchk/packages/$pkgtar > rchk.log 2>&1
cat rchk.log
- uses: r-lib/actions/check-r-package@v2
- name: upload rchk log
uses: actions/upload-artifact@v4
with:
name: rchk-log
path: rchk/rchk.log

0 comments on commit 317ed85

Please sign in to comment.