Skip to content

Commit

Permalink
Test: Checks lint_r as step
Browse files Browse the repository at this point in the history
Checks if deactivating renv is also necessary.
  • Loading branch information
vibalre committed May 12, 2023
1 parent 2fae61a commit 0485d39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,21 @@ jobs:
with:
extra-packages: local::. # Necessary to avoid object usage linter errors.

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install rhino
run: |
Rscript -e "install.packages('remotes')"
Rscript -e "remotes::install_local('../../')"
- name: Create Rhino App
run: |
Rscript -e 'rhino::init("RhinoApp")'
- name: init() should create a Rhino directory
run: |
Rscript -e 'stopifnot(file.exists(fs::path("RhinoApp", "RhinoApp.Rproj")))'
Rscript test-rhino.R
- name: lint_r() should detect lint errors in R scripts
run: |
cd RhinoApp
Rscript -e 'rhino::lint_r()'
2 changes: 0 additions & 2 deletions tests/end2end/test-rhino.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ library(fs)
init("RhinoApp")

stopifnot(file.exists(fs::path("RhinoApp", "RhinoApp.Rproj")))

renv::deactivate()

0 comments on commit 0485d39

Please sign in to comment.