Newer
Older
image: lb584/ews_coordinator:latest
# NOTE, MAKE SURE ANY PIPELINE-LEVEL VARIABLES ARE UNIQUE TO THIS PIPELINE
# WHEN CALLED FROM A MULTI-PIPELINE TRIGGER, VARIABLES WITH SHARED NAMES WILL BE OVERWRITTEN
TEST_WORKSPACE_DIR: "/storage/app/EWS_prod/regions/EastAfrica/test_workspace/"
- "today"
- "yesterday"
- "custom"
description: "Full-fat tests will pull data from the deployment environment. For robustness, the default option is a
pre-selected date we know works. Select \"today\" or \"yesterday\" to test with recent live data. If \"custom\" is
selected, manually enter the key value pair using the format in this example: CUSTOM_RUN_DATE 20230115"
- PACKAGES_DIR="$CI_PROJECT_DIR/packages/"
- echo "project dir - " $CI_PROJECT_DIR
- echo "output dir - " $OUTPUT_DIR
- echo "packages dir - " $PACKAGES_DIR
- echo "full-fat run date - " $FULL_FAT_RUN_DATE
- echo "custom full-fat run date - " $CUSTOM_RUN_DATE
- python3 -V # Print out python version for debugging
- mkdir -p $PACKAGES_DIR
- git clone -b $BRANCH "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-source-generation.git" $PACKAGES_DIR/source_gen
- git clone -b $BRANCH "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews_plotting.git" $PACKAGES_DIR/plotting
- git clone -b $BRANCH "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-epimodel.git" $PACKAGES_DIR/epimodel
- git clone -b main "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-advisory-builder.git" $PACKAGES_DIR/advisory_builder
- git clone -b main "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews_environmental_suitability_v2.git" $PACKAGES_DIR/environmental_suitability
- git clone -b $BRANCH "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-postprocessing.git" $PACKAGES_DIR/post_processing
- git clone -b main "https://nouser:$GROUP_WHEAT_ACCESS_VAR@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews-met-processing.git" $PACKAGES_DIR/met_processing
- epimodel=$PACKAGES_DIR/epimodel
- advisory=$PACKAGES_DIR/advisory_builder
- met_processing=$PACKAGES_DIR/met_processing
- met_processor=$PACKAGES_DIR/environmental_suitability
- plotting=$PACKAGES_DIR/plotting
- post_processing=$PACKAGES_DIR/post_processing
- source_gen=$PACKAGES_DIR/source_gen
- coordinator_tests=$CI_PROJECT_DIR/tests
- export PYTHONPATH=$PYTHONPATH:$met_processor_temp:$epimodel:$advisory:$met_processing:$met_processor:$plotting:$source_gen:$post_processing:$coordinator:$coordinator_tests
- ls $PACKAGES_DIR
L. Bower
committed
when: always
- python3 -m coverage run run_test_suite.py $CI_PROJECT_DIR/test_reports
script:
- cd $CI_PROJECT_DIR/tests/integration/partial/
- python3 -m coverage run -m unittest test_epi.py
- python3 -m coverage report
- ls
artifacts:
paths:
- $CI_PROJECT_DIR/coverage
cd $CI_PROJECT_DIR/tests/integration/full/
--sys_config /storage/app/EWS_prod/regions/EastAfrica/resources/configs/coordinator/fc/sys_config_EastAfrica_fc_live.json
--config /storage/app/EWS_prod/regions/EastAfrica/resources/configs/coordinator/fc/depo_config_EastAfrica_fc_live.json
L. Bower
committed
--outdir ${TEST_WORKSPACE_DIR}/integration/full/
--email_cred /storage/app/EWS_prod/envs/credentials/Cred_gmail.json
--test_report_dir $CI_PROJECT_DIR/test_reports
--run_date_type $FULL_FAT_RUN_DATE
--custom_run_date $CUSTOM_RUN_DATE
tags: ["ewas-production"]
script:
- >
cd $CI_PROJECT_DIR/tests/integration/full/
python3 full_test_env_suit.py
--config /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
L. Bower
committed
--outdir ${TEST_WORKSPACE_DIR}/integration/full/
--email_cred /storage/app/EWS_prod/envs/credentials/Cred_gmail.json
--run_date_type $FULL_FAT_RUN_DATE
--custom_run_date $CUSTOM_RUN_DATE
L. Bower
committed
when: manual
tags: ["ewas-production"]
script:
- >
python3 full_test_survey.py
--config /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
L. Bower
committed
--outdir ${TEST_WORKSPACE_DIR}/integration/full/
--email_cred /storage/app/EWS_prod/envs/credentials/Cred_gmail.json
--run_date_type $FULL_FAT_RUN_DATE
--custom_run_date $CUSTOM_RUN_DATE
full_fat_advisory:
when: manual
stage: full-fat
extends: .before_script
tags: ["ewas-production"]
script:
- >
cd $CI_PROJECT_DIR/tests/integration/full/
python3 full_test_advisory.py
--config /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
L. Bower
committed
--outdir ${TEST_WORKSPACE_DIR}/integration/full/
--email_cred /storage/app/EWS_prod/envs/credentials/Cred_gmail.json
--run_date_type $FULL_FAT_RUN_DATE
--custom_run_date $CUSTOM_RUN_DATE
full_fat_epi:
when: manual
stage: full-fat
extends: .before_script
tags: ["ewas-production"]
script:
- >
cd $CI_PROJECT_DIR/tests/integration/full/
python3 full_test_epi.py
--config /storage/app/EWS_prod/regions/EastAfrica/resources/coordinator/configs/config_EastAfrica_fc_live.json
L. Bower
committed
--outdir ${TEST_WORKSPACE_DIR}/integration/full/
--email_cred /storage/app/EWS_prod/envs/credentials/Cred_gmail.json
--run_date_type $FULL_FAT_RUN_DATE
--custom_run_date $CUSTOM_RUN_DATE
L. Bower
committed
when: manual
- export PATH=$PATH:/home/ewsmanager/.local/bin
- make html
- mkdir $CI_PROJECT_DIR/public
- mv -v $CI_PROJECT_DIR/docs/_build/html/* $CI_PROJECT_DIR/public/
- ls $CI_PROJECT_DIR/public/