Add automated CI testing through cron on Orion#12
Conversation
|
Automated Pull Request Testing Results: |
| fi | ||
| # ============================================================================== | ||
| # run ctests | ||
| cd $repodir/build |
There was a problem hiding this comment.
@CoryMartin-NOAA , why not limit the testing to this repo only and ignore the test status of the jedi components? It might sounds silly right now, but in the next few pr's we will have specific tests for the "prep" "run" and "post" steps, which will be making use of the various jedi components. I think it's a good enough "canary".
I vote for ctest -R gdasapp or something of that effect.
Or maybe 2 reports? One for the jedi components and one for the gdasapp tests?
There was a problem hiding this comment.
Would you also suggest not building the JEDI apps (at least for now) also?
There was a problem hiding this comment.
Nope, we might as well do the build now. We're going to start adding tests using the jedi apps soon enough.
That's currently what I'm working on, just empty stubs right now but I'm hoping to have a basic jedi/soca var application by the end of the day:
build$ ctest -R gdasapp
Test project /home/gvernier/sandboxes/GDASApp/build
Start 1448: test_gdasapp_soca_obsdb
1/4 Test #1448: test_gdasapp_soca_obsdb .......... Passed 0.27 sec
Start 1449: test_gdasapp_soca_ana_prep
2/4 Test #1449: test_gdasapp_soca_ana_prep ....... Passed 0.01 sec
Start 1450: test_gdasapp_soca_ana_run
3/4 Test #1450: test_gdasapp_soca_ana_run ........ Passed 0.00 sec
Start 1451: test_gdasapp_soca_ana_post
4/4 Test #1451: test_gdasapp_soca_ana_post ....... Passed 0.00 sec
100% tests passed, 0 tests failed out of 4
Label Time Summary:
gdasapp = 0.29 sec*proc (4 tests)
script = 0.29 sec*proc (4 tests)There was a problem hiding this comment.
We'll need to remember adding gdasapp (or something) to the one test we currently have. It's now called test_check_yaml_keys so something like test_gdasapp_check_yaml_keys, or whatever consensus we decide on.
aerorahul
left a comment
There was a problem hiding this comment.
looks good mostly, just a few minor comments and clarification.
| @@ -0,0 +1,75 @@ | |||
| #!/bin/bash | |||
| #set -eu | |||
There was a problem hiding this comment.
did you intend to leave this commented out?
| # run build script | ||
| cd $repodir | ||
| module purge | ||
| ./build.sh -t $TARGET &>> log.build |
There was a problem hiding this comment.
don't you want to capture stderr as well? 2>&1
There was a problem hiding this comment.
Doesn't this do that?
There was a problem hiding this comment.
I don't think so, but I may be wrong.
There was a problem hiding this comment.
>> out is stdout but &>> adds the stderr I thought.
| module use $GDAS_MODULE_USE | ||
| module load GDAS/$TARGET | ||
| echo "---------------------------------------------------" >> $outfile | ||
| ctest --output-on-failure &>> log.ctest |
There was a problem hiding this comment.
is this why set -e was commented up?
If so, you can wrap the ctest line around set +e and set -e.
There was a problem hiding this comment.
The set -e comes from conda when you do module load, it is something in the pyproj init shell script. I could probably manually fix this in the conda env if you think that is okay?
| load("hpc") | ||
| load("miniconda3") | ||
| load("gdasapp") |
There was a problem hiding this comment.
Try and list the explicit versions instead of relying on defaults
There was a problem hiding this comment.
Good suggestion.
|
@guillaumevernieres none of the tests ran with this newest commit on Hera... need to figure out why. |
Oh duh, it ran the test with the old test names... all should be good here I think. |
**What was done:** - reorganization/code tidy to facilitate the addition of a GFSv17 prototype ctest - exclude the new ctest by default, the user will have to run ```cmake -DRUNGWCI=ON .``` on an old build to configure the new ctest He're the current list: ``` Test project /scratch1/NCEPDEV/stmp2/Guillaume.Vernieres/runs/prs/global-workflow/sorc/gdas.cd/build/gdas/test/gw-ci Test #1: WCDA-3DVAR-C48mx500 Test #2: WCDA-3DVAR-C48mx500_gdasfcst_202103241200 Test #3: WCDA-3DVAR-C48mx500_gdasprepoceanobs_202103241800 Test #4: WCDA-3DVAR-C48mx500_gdasocnanalprep_202103241800 Test #5: WCDA-3DVAR-C48mx500_gdasocnanalbmat_202103241800 Test #6: WCDA-3DVAR-C48mx500_gdasocnanalrun_202103241800 Test #7: WCDA-3DVAR-C48mx500_gdasocnanalchkpt_202103241800 Test #8: WCDA-3DVAR-C48mx500_gdasocnanalpost_202103241800 Test #9: Aero-Snow-3DVAR-C96 Test #10: Aero-Snow-3DVAR-C96_gdasfcst_202112201200 Test #11: Atm-hyb-C96C48 Test #12: Atm-hyb-C96C48_gdasfcst_202402231800 Test #13: GFSv17-3DVAR-C384mx025 Test #14: GFSv17-3DVAR-C384mx025_gdasfcst_202106300000 Test #15: GFSv17-3DVAR-C384mx025_gdasprepoceanobs_202106300600 Test #16: GFSv17-3DVAR-C384mx025_gdasocnanalprep_202106300600 Test #17: GFSv17-3DVAR-C384mx025_gdasocnanalbmat_202106300600 Test #18: GFSv17-3DVAR-C384mx025_gdasocnanalrun_202106300600 Test #19: GFSv17-3DVAR-C384mx025_gdasocnanalchkpt_202106300600 Test #20: GFSv17-3DVAR-C384mx025_gdasocnanalpost_202106300600 Test #21: GFSv17-3DVAR-C384mx025_gdasocnanalvrfy_202106300600 Test #22: GFSv17-3DVAR-C384mx025_gdasprep_202106300600 Test #23: GFSv17-3DVAR-C384mx025_gdasanal_202106300600 Total Tests: 23 ``` --------- Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
* Start of CI cron scripts
**What was done:** - reorganization/code tidy to facilitate the addition of a GFSv17 prototype ctest - exclude the new ctest by default, the user will have to run ```cmake -DRUNGWCI=ON .``` on an old build to configure the new ctest He're the current list: ``` Test project /scratch1/NCEPDEV/stmp2/Guillaume.Vernieres/runs/prs/global-workflow/sorc/gdas.cd/build/gdas/test/gw-ci Test #1: WCDA-3DVAR-C48mx500 Test #2: WCDA-3DVAR-C48mx500_gdasfcst_202103241200 Test #3: WCDA-3DVAR-C48mx500_gdasprepoceanobs_202103241800 Test #4: WCDA-3DVAR-C48mx500_gdasocnanalprep_202103241800 Test #5: WCDA-3DVAR-C48mx500_gdasocnanalbmat_202103241800 Test #6: WCDA-3DVAR-C48mx500_gdasocnanalrun_202103241800 Test #7: WCDA-3DVAR-C48mx500_gdasocnanalchkpt_202103241800 Test #8: WCDA-3DVAR-C48mx500_gdasocnanalpost_202103241800 Test #9: Aero-Snow-3DVAR-C96 Test #10: Aero-Snow-3DVAR-C96_gdasfcst_202112201200 Test #11: Atm-hyb-C96C48 Test #12: Atm-hyb-C96C48_gdasfcst_202402231800 Test #13: GFSv17-3DVAR-C384mx025 Test #14: GFSv17-3DVAR-C384mx025_gdasfcst_202106300000 Test #15: GFSv17-3DVAR-C384mx025_gdasprepoceanobs_202106300600 Test #16: GFSv17-3DVAR-C384mx025_gdasocnanalprep_202106300600 Test #17: GFSv17-3DVAR-C384mx025_gdasocnanalbmat_202106300600 Test #18: GFSv17-3DVAR-C384mx025_gdasocnanalrun_202106300600 Test #19: GFSv17-3DVAR-C384mx025_gdasocnanalchkpt_202106300600 Test #20: GFSv17-3DVAR-C384mx025_gdasocnanalpost_202106300600 Test #21: GFSv17-3DVAR-C384mx025_gdasocnanalvrfy_202106300600 Test #22: GFSv17-3DVAR-C384mx025_gdasprep_202106300600 Test #23: GFSv17-3DVAR-C384mx025_gdasanal_202106300600 Total Tests: 23 ``` --------- Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
Closes #9
This PR adds scripts for automated CI testing on NOAA HPC platforms. First Orion, but minor additions will be needed for Hera once the python virtual environment there is set up properly.
Every 15 mins, Orion-login-1 will run
$clone/ci/driver.sh -t orion.The script will check to see which open PR(s) in GDASApp have the label
Orion-RTand for each one, checkout, build, and test and report back/change labels as appropriate through @emcbot .Note: the modulefile changed in #6 but has not been merged yet but is also included in this PR as it is needed for the GitHub CLI.