This adds the exported function ci_validate_hub_config(). It will replace 24 lines of R code embedded in YAML with a single call: hubAdmin::ci_validate_hub_config().
It will not show up in the default user manual because I've added the internal keyword to its documentation.
This will fix #31
The new steps for the validate-config action would look like this:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
install-r: false
use-public-rspm: true
extra-repositories: 'https://hubverse-org.r-universe.dev'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: 'always'
packages: |
any::hubAdmin
any::sessioninfo
- name: Run validations
id: validate
run: hubAdmin::ci_validate_config()
shell: Rscript {0}
- name: "Comment on PR"
id: comment-diff
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: carpentries/actions/comment-diff@main
with:
pr: ${{ env.PR_NUMBER }}
path: ${{ env.HUB_PATH }}/diff.md
- name: Error on Failure
if: ${{ steps.validate.outputs.result == 'false' }}
run: |
echo "::error title=Invalid Configuration::Errors were detected in one or more config files in 'hub-config/'"
exit 1
Ready for your review, @annakrystalli, but I have no clue why the lintr is getting angry with me.... it's valid tidyverse style and I can't reproduce the error on my machine.
This adds the exported function
ci_validate_hub_config()
. It will replace 24 lines of R code embedded in YAML with a single call:hubAdmin::ci_validate_hub_config()
.It will not show up in the default user manual because I've added the
internal
keyword to its documentation.This will fix #31
The new steps for the validate-config action would look like this: