Skip to content

explicitly also load shiny #6

explicitly also load shiny

explicitly also load shiny #6

Workflow file for this run

name: Test Shiny App Startup
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
R_LIBS_USER: ~/R/library
steps:
- uses: actions/checkout@v3
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION', '**/renv.lock', '**/NAMESPACE') }}
restore-keys: |
${{ runner.os }}-r-
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
if (!requireNamespace("shiny", quietly = TRUE)) {
install.packages('shiny', repos='http://cran.rstudio.com/')
}
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages('remotes', repos='http://cran.rstudio.com/')
}
remotes::install_deps(dependencies = TRUE)
- name: Test if Shiny app starts
run: |
Rscript -e "shiny::runApp('program/shinyApp', launch.browser = FALSE, port = 3838)"
sleep 10 # Sleep for 10 seconds to ensure the app has time to start
curl http://localhost:3838