Skip to content

Commit

Permalink
Merge pull request #93 from UBC-MDS/test2
Browse files Browse the repository at this point in the history
adding test_that files & fix the title changes
  • Loading branch information
vincentho32 authored Mar 17, 2023
2 parents e10e92b + 2c7906e commit 2c98d2e
Show file tree
Hide file tree
Showing 12 changed files with 4,053 additions and 27 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,38 @@ jobs:
- uses: actions/checkout@v2

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

# DON'T ADD LINES 34-57. This is for my app.
# If the action is not working without this, the system requirements for your packages instead.
- name: Cache APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: |
make
gdal-bin
libssl-dev
libcurl4-openssl-dev
libudunits2-dev
libgdal-dev
libgeos-dev
libgeos++-dev
libicu-dev
libproj-dev
libpng-dev
zlib1g-dev
run: |
sudo apt-get update
sudo apt-get install -y ${{ join(needs.build.outputs.packages, ' ') }}
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true

# You need a renv.lock in your repo install all the R packages here with this action
- uses: r-lib/actions/setup-renv@v2

- uses: rstudio/shinytest2/actions/test-app@v1
with:
app-dir: "."
upload-snapshots: true
upload-snapshots: true
10 changes: 5 additions & 5 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ server <- function(input, output, session) {
output$bar_temptitle <- renderText({
if (input$temp_unit == "Celsius") {
ifelse(input$highlow == "high",
paste("Cities in", input$state, "by Highest Average Temperature in", input$month, "(°C)"),
paste("Cities in", input$state, "by Lowest Average Temperature in", input$month, "(°C)"))}
paste("Cities in", input$statename, "by Highest Average Temperature in", input$month, "(°C)"),
paste("Cities in", input$statename, "by Lowest Average Temperature in", input$month, "(°C)"))}
else {
ifelse(input$highlow == "high",
paste("Cities in", input$state, "by Highest Average Temperature in", input$month, "(°F)"),
paste("Cities in", input$state, "by Lowest Average Temperature in", input$month, "(°F)"))}
paste("Cities in", input$statename, "by Highest Average Temperature in", input$month, "(°F)"),
paste("Cities in", input$statename, "by Lowest Average Temperature in", input$month, "(°F)"))}
})

output$bar_prectitle <- renderText({
paste("Cities in", input$state, "by Average Precipitation in", input$month, "(Inches)")})
paste("Cities in", input$statename, "by Average Precipitation in", input$month, "(Inches)")})

# Update city and state input based on map clicks
observeEvent(input$map_marker_click, {
Expand Down
Loading

0 comments on commit 2c98d2e

Please sign in to comment.