Set of scripts to test templates against their golden standard runs.
Create a new project based on the template repository.
Create a new project from Github.
Create a standard Tercen workflow. Run the steps as needed.
A finalized workflow might look like the one below.
Clone the workflow to create the golden standard. Rename it with an unique _gs suffix (see naming convention).
Once cloned, both Template and Golden Standard will be in the same folder. We want to move the Golden Standard workflow to a folder named tests. To do so, rename the Golden Standard, adding tests/ before the name and pressing the Ok button.
Open the Template Workflow (the one without the _gs** suffix), reset and save it.
Finally, select the Git button.
Then, add any desired commit message, your personal Github token and press Ok.
A Template workflow is compared to its Golden Standard workflows based on a naming convention.
A workflow is considered a Golden Standard if its name ends with _gs*, where * is a set of letter and numbers. For example, Template_gs1, Template_gsA01 and Template_gsAA are all valid Golden Standard names, whereas Template_gs_01 is not.
A Template and a Golden Standard are considered match if they have the same base name, that is, everything before the _gs suffix. For example, Workflow, Workflow_gs01 and Workflow_gs02 refer to a template (Workflow) and its two Golden Standards.
The workflow runner is contained within a docker and can be called like the example below, containing all mandatory (in bold) and optional arguments:
docker run -t --net=host tercen/workflow_runner:latest
--templateRepo=tercen/git_project_test
--branch=main --tag=1.0.0 --gitToken=token
[--taskId='' --token='' | --user='test' --passw='']
--serviceUri=http://127.0.0.1:5400 --opMem="500000000"
--toleranceType=relative --tolerance=0.001
--update_operator --quiet --report
PARAMETER | DEFAULT VALUE | DESCRIPTION |
---|---|---|
user | test | Tercen username |
passw | test | Tercen password |
token | - | Authorization token to be used instead of password |
gitToken | - | Authorization token to be used when connecting to github |
serviceUri | http://127.0.0.1:5400 | Tercen URI where the runner will execute the tests |
PARAMETER | DEFAULT VALUE | DESCRIPTION |
---|---|---|
templateRepo | - | Github template repository (e.g. tercen/workflow_lib) |
branch | main | Github template repository branch |
tag | - | Tag or commit hash string |
PARAMETER | DEFAULT VALUE | DESCRIPTION |
---|---|---|
quiet | - | Switch. If present, suppress information messages. |
update_operator | - | Switch. If present, check and updates operator version by latest release. |
report | - | Switch. If present, runs in report mode (see below). |
The workflow runner can be executed as an operator within a workflow. The operator will perform the tests for each set of repository, branch and version found in the input.
Factor name must be as indicated in the table below.
| FACTOR | | DESCRIPTION |
| ---------- | ---------- |
| repository | - | Github template repository (e.g. https://github.com/tercen/workflow_lib) |
| branch | main | Github template repository branch (e.g. main) |
| version | - | Tag or commit hash string (e.g. 1.0, blank or commit identifier) |