-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #452 from molgenis/chore/semi-automatic-release-test
chore: add semi automatic release testing script
- Loading branch information
Showing
3 changed files
with
848 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Release testing | ||
## Prerequisites | ||
- Testserver with release candidate available | ||
- OIDC user with admin permissions on testserver | ||
- Following libraries installed in R: | ||
- cli | ||
- getPass | ||
- arrow | ||
- httr | ||
- jsonlite | ||
- future | ||
- MolgenisArmadillo (2.0.0 >) | ||
- DSI | ||
- dsBaseClient | ||
- DSMolgenisArmadillo (2.0.0 >) | ||
- resourcer (1.4.0 >) | ||
|
||
*For full testing* | ||
- Admin password by hand | ||
|
||
*Minimal* | ||
- OIDC user with admin/superuser permissions on testserver | ||
- Someone with admin permissions available to take and regrant admin permissions to OIDC (super)user | ||
|
||
With these minimal prerequisites met, tests for basic auth will be skipped and permissions will have to be set by hand | ||
when asked by script. | ||
|
||
OR | ||
- A basic admin password | ||
|
||
With these minimal prerequisites, the script will then skip the resources testing (is not possible with basic auth) and | ||
testing as regular user | ||
|
||
## Running the tests | ||
1. Open your commandline | ||
2. `cd` to the `scripts/release` folder of this repository | ||
3. To run tests, type: `Rscript release-test.R` | ||
4. Follow the directions in the script | ||
|
||
If the script fails somewhere during the process, make sure you give your OIDC account back their admin permissions and | ||
throw away the projects: cohort1, cohort2 and omics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
cat(" | ||
__ __ ____ _ _____ ______ _ _ _____ _____ _ _ _ _ | ||
| \\/ |/ __ \\| | / ____| ____| \\ | |_ _|/ ____| /\\ | (_) | | | ||
| \\ / | | | | | | | __| |__ | \\| | | | | (___ / \\ _ __ _ __ ___ __ _ __| |_| | | ___ | ||
| |\\/| | | | | | | | |_ | __| | . ` | | | \\___ \\ / /\\ \\ | '__| '_ ` _ \\ / _` |/ _` | | | |/ _ \\ | ||
| | | | |__| | |___| |__| | |____| |\\ |_| |_ ____) | / ____ \\| | | | | | | | (_| | (_| | | | | (_) | | ||
|_| |_|\\____/|______\\_____|______|_| \\_|_____|_____/ /_/ \\_\\_| |_| |_| |_|\\__,_|\\__,_|_|_|_|\\___/ | ||
_____ _ _ _ | ||
| __ \\ | | | | | | | ||
| |__) |___| | ___ __ _ ___ ___ | |_ ___ ___| |_ | ||
| _ // _ \\ |/ _ \\/ _` / __|/ _ \\ | __/ _ \\/ __| __| | ||
| | \\ \\ __/ | __/ (_| \\__ \\ __/ | || __/\\__ \\ |_ | ||
|_| \\_\\___|_|\\___|\\__,_|___/\\___| \\__\\___||___/\\__| | ||
") | ||
cat("Installing dependencies for release test\n") | ||
install.packages("cli", repos = "http://cran.us.r-project.org") | ||
library(cli) | ||
cli_alert_success("package [cli] installed") | ||
cli_alert_info("Installing other packages") | ||
|
||
packages <- c("getPass", "arrow", "jsonlite", "future", "MolgenisArmadillo", "DSI", "devtools", "resourcer", "DSMolgenisArmadillo", "RCurl") | ||
|
||
install_requirements_from_cran <- function(packages) { | ||
n_requirements <- length(packages) | ||
cli_progress_bar("Installing packages", total = n_requirements) | ||
for (i in 1:n_requirements) { | ||
pkg <- packages[i] | ||
cli_alert_info(paste0("Installing ", pkg)) | ||
install.packages(pkg, repos = "http://cran.us.r-project.org", quiet=TRUE) | ||
cli_progress_update() | ||
} | ||
cli_progress_done() | ||
} | ||
install_requirements_from_cran(packages) | ||
|
||
library("devtools") | ||
install_github("datashield/dsBaseClient") | ||
#check if all packages are installed | ||
cli_alert_success("All packages are installed") |
Oops, something went wrong.