Skip to content

Commit

Permalink
Updated tidy code and shiny tests workflow scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby committed Nov 27, 2024
1 parent 93fe79e commit 62800bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/shiny-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Cache renv packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
Expand All @@ -59,7 +59,7 @@ jobs:
run: |
echo "::set-output name=path::$(Rscript -e 'cat(shinytest:::phantom_paths()[[1]])')"
- name: Cache PhantomJS
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.phantomjs.outputs.path }}
key: ${{ runner.os }}-phantomjs
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/tidyCode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
tidyCode:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
name: tidyCode

strategy:
fail-fast: false
Expand All @@ -26,29 +26,20 @@ jobs:
RENV_PATHS_ROOT: ~/.local/share/renv

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Cache renv packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore renv snapshot
shell: Rscript {0}
run: |
Expand All @@ -60,7 +51,7 @@ jobs:
run: |
source("global.R")
codeChecks <- dfeshiny::tidy_code()
codeChecks <- tidy_code()
if(any(is.na(codeChecks))) {
stop("There is a breaking error in the code.")
Expand Down

0 comments on commit 62800bc

Please sign in to comment.