how to handle ROracle dependency in CI (GitHub Actions)

My package, trrrj, has, among other functionality, a set of functions that wrap data export from our internal Oracle DB.
In the CI (via GitHub Actions) the package dependencies installation fails due to ROracle.
As you probably know installing ROracle is a pain the the neck and it is not really available out of the box as for other DBs/packages.

I was thinking to exclude ROracle from the list of packages to install maybe using the following code somewhere in the Install dependencies step of the R-CMD-check.yaml

# read DESCRIPTION in current dir
desc <- description$new()
desc$get_deps() %>% as_tibble() %>% filter(package != "ROracle")

The idea is to pass the list of packages instead of TRUE to the call remotes::install_deps(dependencies = TRUE)

Does it make sense?
Has anybody tried to solve the ROracle depenency this way before?
How to pass a long-ish script to GH Actions' step?

I am looking forwards to hearing for ideas, suggestions, examples.


So what I finally did was to remove completely ROracle from the Import section in DESCRIPTION and connect to it indirectly via DBI (see the relevant commit snippet):

in my function accessing the tables in Oracle I have:

my_query_function <- function(param_for_query) {
  # DB params
  usr  <- Sys.getenv("DB_USR")
  pwd <- Sys.getenv("DB_PWD")
  dbn <- Sys.getenv("DB_DBNAME")

  con <- withr::local_db_connection(
      usr, pwd,
      dbname = dbn,
      timezone = "UTC")
  # query to retrieve the data from Oracle
  query <- "..."
# ...
  query_safe <- DBI::sqlInterpolate(con, query, PARAM = param)
  data <- DBI::dbSendQuery(con, query_safe)
  DBI::fetch(data, n = -1) %>%

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.