-
Notifications
You must be signed in to change notification settings - Fork 2
[WIP] Run tests as part of the CI process #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AdelekeBankole This is a good start and it is good to see it is running with GitHub CI!
There are a few things that I don't think we need here (I know I said to start with the FTorch CI as an example) that I have provided 'suggestions' to remove.
The next step I think is to define a series of steps
to run the test suite as we would on a local machine. This will include:
- Install any python dependencies
- Generate the sounding files using python
- Build the code using CMake
- Run the test suites
- Modify the test suites to return exit codes for success/failure
Let me know if you want me to take another look after further changes or have any queries.
Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the CI currently fails because it does not build the sounding in the correct location.
Try the suggestion below, and we can take a closer look this afternoon.
Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
@AdelekeBankole Looking at the latest failure on the test script it seems python netcdf cannot find the HDF5 library or something. |
@AdelekeBankole Looks like the versions are too strict in the YOG/resources/requirements.txt Though note you may need to restrict numpy to <2.0 as I recall it had issues with the major version change and I do not know if they have been resolved yet. |
@jatkinson1000, you mean restricting it to |
@AdelekeBankole I meant from the pip dependencies in the requirements.txt file - the workflow was complaining that it could not find the exact version of numpy. See PR #90 to this branch that has a patch to do this. I also added netCDF-Fortran that was missing from the dependencies. My branch now builds the test suite so hopefully allows you to continue troubleshooting. |
It is a binary, but unlikely to change and cannot be generated in the CI due to issues with netcdf save in python requiring os.getlogin which doesn't work on CI runners for some reason (similar issues can be found elsewhere).
…aded as NetCDF file.
…version updates in future.
Co-authored-by: Marion <56403724+MarionBWeinzierl@users.noreply.github.com>
Fix various problems for building and running tests in GitHub CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's looking good @AdelekeBankole !
Now you just need to un-break it ;)
A quick thought - did you also want to run the other test suite as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AdelekeBankole This all looks like good work to me and I have approved.
I have made one small suggestions regarding what I believe is an unnecessary python setup in the job that you might want to look at.
I'm happy for you to merge after checking this.
Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
On moving forward for the test suite in CAM-ML. This PR aims to run our tests as part of the continuous integration process.