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 shinytest2 for testing run example and draft yaml for deploy #118

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^pkgdown$
^\.github$
^LICENSE\.md$
_\.new\.png$
39 changes: 39 additions & 0 deletions .github/workflows/showcase-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches:
- main
- master

name: Showcase app deploy

jobs:
deployShiny:
runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Load package
shell: Rscript {0}
run: |
devtools::load_all()

- name: Install rsconnect
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::install("rsconnect")

- name: Push to shinyapps.io
run: >
Rscript
-e "rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')"
-e "shiny_app <- run_example()"
-e "rsconnect::deployApp(shiny_app, forceUpdate = TRUE)"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.RData
.DS_Store
docs/
# {shinytest2}: Ignore new debug snapshots for `$expect_values()`
*_.new.png
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Imports:
shinyjs,
stringr
Suggests:
testthat
testthat,
shinytest2
Encoding: UTF-8
RoxygenNote: 7.3.2
Loading
Loading