Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add working-directory input to check-r-package #444

Closed
wants to merge 16 commits into from
Closed
8 changes: 8 additions & 0 deletions check-r-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ This action checks an R package using the [rcmdcheck](https://r-lib.github.io/rc

# Usage

Inputs available:
- description - default `"--no-manual", "--as-cran"`. Arguments to pass to the `args` parameter of `rcmdcheck`
- build_args - default `""`. Arguments to pass to the `build_args` parameter of `rcmdcheck`
- error-on - default `"warning"`. Arguments to pass to the `error-on` parameter of `rcmdcheck`
- check-dir - default `"check"`. Arguments to pass to the `check-dir` parameter of `rcmdcheck`
- working-directory - default `"."`. If the R package to check is not in the root directory of your repository.

Basic:
```yaml
steps:
- uses: actions/checkout@master
Expand Down
7 changes: 7 additions & 0 deletions check-r-package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ inputs:
check-dir:
description: 'Where should the check output go?'
default: '"check"'
working-directory:
description: 'Using the working-directory keyword, you can specify the working directory of where "rcmdcheck::rcmdcheck" is run.
default: '.'

runs:
using: "composite"
defaults:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just call rcmdcheck::rcmdcheck(path = ${{ inputs.working-directory }}?

run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: Check
env:
Expand Down