Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust step for r-dependencies installation #19

Merged
merged 4 commits into from
Jan 11, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,19 @@ jobs:
sudo apt install libharfbuzz-dev libfribidi-dev libgit2-dev libcurl4-openssl-dev
shell: bash

- name: Set environment variable to never compile packages on Windows and macOS
if: runner.os != 'Linux' && matrix.r != 'devel'
run: |
# don't try to install new pkgs versions from source (which often requires additional system dependencies which, when missing, lead to errors, e.g., ragg).
cat("\noptions(install.packages.compile.from.source = \"never\")\n", file = "~/.Rprofile", sep = "", append = TRUE)
shell: Rscript {0}

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
github::jasp-stats/jaspTools
cran::igraph
shun2wang marked this conversation as resolved.
Show resolved Hide resolved
needs: check
cache-version: 2

Expand All @@ -135,26 +146,11 @@ jobs:
run: sudo apt install jags
shell: bash

- name: Set environment variable to never compile packages on Windows and macOS
if: runner.os != 'Linux' && matrix.r != 'devel'
run: |
# don't try to install new pkgs versions from source (which often requires additional system dependencies which, when missing, lead to errors, e.g., ragg).
cat("\noptions(install.packages.compile.from.source = \"never\")\n", file = "~/.Rprofile", sep = "", append = TRUE)
shell: Rscript {0}

- name: Setup jaspTools
run: |
install.packages(c("remotes", "ragg"))
remotes::install_github("jasp-stats/jaspTools")
jaspTools::setupJaspTools()
shell: Rscript {0}

# so Rstudio's binary for igraph appears to be incompatible (i.e., crashes hard) with GitHub actions. Instead, we install igraph from source
- name: Make sure igraph is installed from source
if: runner.os == 'Linux' && inputs.needs_igraph
run: install.packages("igraph", type = "source", repos = "https://cloud.r-project.org/")
shell: Rscript {0}

- name: Run unit tests
run: source("tests/testthat.R")
shell: Rscript {0}