-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix-header-logo-issues
- Loading branch information
Showing
6 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
^pkgdown$ | ||
^\.github$ | ||
^LICENSE\.md$ | ||
_\.new\.png$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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 packages and push to shinyapps.io | ||
shell: Rscript {0} | ||
run: | | ||
if (!requireNamespace("devtools", quietly = TRUE)) install.packages("devtools") | ||
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | ||
renv::install("shinyjs") | ||
devtools::install() | ||
devtools::load_all() | ||
renv::install("rsconnect") | ||
rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}') | ||
shiny_app <- run_example() | ||
rsconnect::deployApp(shiny_app, forceUpdate = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
.RData | ||
.DS_Store | ||
docs/ | ||
# {shinytest2}: Ignore new debug snapshots for `$expect_values()` | ||
*_.new.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ Imports: | |
shinyjs, | ||
stringr | ||
Suggests: | ||
testthat | ||
testthat, | ||
shinytest2 | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
library(shinytest2) | ||
|
||
test_that("shiny example loads", { | ||
shiny::testServer( | ||
app = run_example(), { | ||
expect_equal( | ||
session$isClosed(), | ||
FALSE | ||
) | ||
test_that("App loads and title of app appears as expected", { | ||
# Don't run these tests on the CRAN build servers | ||
skip_on_cran() | ||
|
||
} | ||
shiny_app <- run_example() | ||
app <- AppDriver$new(shiny_app, name = "showcase") | ||
|
||
expect_equal( | ||
app$get_text("title"), | ||
"ShinyGovstyle" | ||
) | ||
}) |