Skip to content

Commit

Permalink
Merge pull request #86 from hubverse-org/znk/task-config-vignette
Browse files Browse the repository at this point in the history
add scripting tasks config vignette
  • Loading branch information
zkamvar authored Dec 24, 2024
2 parents 725c22b + dac3b89 commit e65953d
Show file tree
Hide file tree
Showing 3 changed files with 403 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/pkgdown-netlify-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-tinytex@v2

Expand All @@ -53,13 +53,20 @@ jobs:
clean: false
branch: gh-pages
folder: docs

- id: deploy-dir
name: Determine dev status
run: |
if [[ $(grep -c -E 'sion. ([0-9]*\.){3}' ${{ github.workspace }}/DESCRIPTION) == 1 ]]; then
echo 'dir=./docs/dev' >> $GITHUB_OUTPUT
else
echo 'dir=./docs' >> $GITHUB_OUTPUT
fi
- name: Deploy PR preview to Netlify
if: contains(env.isPush, 'false')
id: netlify-deploy
uses: nwtgck/actions-netlify@v2
uses: nwtgck/actions-netlify@v3
with:
publish-dir: './docs'
publish-dir: '${{ steps.deploy-dir.outputs.dir }}'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
Expand Down
6 changes: 6 additions & 0 deletions tests/testthat/test-validate_model_metadata_schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ test_that("Missing files returns an invalid config with an immediate message", {
"File does not exist"
)
})
# NOTE: this needs to be unclassed because otherwise testthat assumes it is
# an error: https://github.com/hubverse-org/hubAdmin/pull/86/files#r1882552109
expect_false(unclass(out))
})

Expand All @@ -28,6 +30,8 @@ test_that("validate_model_metadata_schema works", {
)
)
)
# NOTE: this needs to be unclassed because otherwise testthat assumes it is
# an error: https://github.com/hubverse-org/hubAdmin/pull/86/files#r1882552109
expect_false(unclass(out_error))
expect_snapshot(out_error) # prints .Last.value
expect_snapshot(print(out_error)) # prints out_error
Expand All @@ -51,6 +55,8 @@ test_that("validate_model_metadata_schema errors for imparsable json", {
"SyntaxError"
)
})
# NOTE: this needs to be unclassed because otherwise testthat assumes it is
# an error: https://github.com/hubverse-org/hubAdmin/pull/86/files#r1882552109
expect_false(unclass(out))

})
Loading

0 comments on commit e65953d

Please sign in to comment.