Add running the unittests to the GitHub workflow#321
Conversation
mo-nikosbaltas
left a comment
There was a problem hiding this comment.
Although the unit tests block is correct and works, my suggestion is:
Instead of:
eval "$(conda shell.bash hook)"
conda activate cmew
...
Use conda run:
conda run -n cmew cylc validate -O metoffice -O unittest .
This eliminates shell activation issues and is more reliable in Actions.
This also applies to other tests in this file.
As already said this is a suggestion.
- name: Run Cylc unit tests
run: |
cd CMEW
conda run -n cmew cylc vip -O metoffice -O unittest .
Although not applicable for this issue I would suggest to include some logging by adding at the end:
- name: Upload cylc-run logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: cylc-run-logs
path: ~/cylc-run
Otherwise it is all good for me.
|
The unit tests should read: not In my previous comment I was giving an example for 'cylc validate'. Sorry if I confused you. Also the checks failed when pushing. Can you correct? |
Made the changes and also added the logging. Working fine. |
mo-nikosbaltas
left a comment
There was a problem hiding this comment.
Modify PR title to : #321: Add running the unittests to the GitHub workflow. See https://github.com/MetOffice/CMEW/wiki/Detailed-Working-Practices#create-a-pull-request
Done |
|
Also, @zmaalick can you change the copyright years (# (C) Crown Copyright 2022-2025, Met Office.) in the file to 2022-2026. |
Done |
ehogan
left a comment
There was a problem hiding this comment.
Thanks @zmaalick 🥳
The "end of new line" issue with one of the files in this branch suggests you have not set up the pre-commit hooks. Please set up the pre-commit hooks. Instructions are available at https://github.com/MetOffice/CMEW/wiki/First-time-developer-instructions#first-time-developer-instructions.
Closes #165 .
PR creation checklist for the developer
<issue_number>above ☝️ been replaced with the issue number?mainbeen selected as the base branch?<issue_number>_<short_description_of_feature>?good first issuelabel) been added to the PR?Climate Model Evaluation Workflow (CMEW)project been added to the PR?Definition of Done for the developer
docdirectory) related to the change been updated appropriately, including the Quick Start section?PR creation checklist for the reviewer
<issue_number>above ☝️ been replaced with the issue number?mainbeen selected as the base branch?<issue_number>_<short_description_of_feature>?good first issuelabel) been added to the PR?Climate Model Evaluation Workflow (CMEW)project been added to the PR?Definition of Done for the reviewer
docdirectory) related to the change been updated appropriately including the Quick Start section? N/A