add system wide dependencies #9
Workflow file for this run
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
name: Test Shiny App Startup | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RENV_PATHS_ROOT: ~/.cache/R/renv | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Install system dependencies | |
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev | |
- name: Cache packages | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.RENV_PATHS_ROOT }} | |
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | |
restore-keys: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libsqlite3-dev libglu1-mesa-dev default-jdk libmagick++-dev | |
- name: Restore packages | |
shell: Rscript {0} | |
run: | | |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv") | |
renv::restore() | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- 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 |