R Under development (unstable) (2024-05-15 r86556 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(gitlabr) > > # Create your own "dev/environment.yml" from "dev/environment.yml.example" > if (file.exists("../dev/environment.yml")) { + do.call( + Sys.setenv, + yaml::yaml.load_file("../dev/environment.yml") + ) + } > > # There must be a token > # Testers should own a project on gitlab.com named "testor" > # This part allows to test multiple versions of the API. > # Currently, only v4 is tested. > if (Sys.getenv("GITLABR_TEST_TOKEN") != "") { + # Skip all tests if no token + + if (Sys.getenv("GITLABR_TEST_API_VERSION") == "") { + Sys.setenv(GITLABR_TEST_API_VERSION = 4) + test_check("gitlabr") + } else { + test_check("gitlabr") + } + } else { + # dont test on CRAN or without token available + } NULL > > proc.time() user system elapsed 0.48 0.20 0.67