-
Notifications
You must be signed in to change notification settings - Fork 2
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
MATLAB testing GitHub Action #145
Comments
Unfortunately, I believe that this task is intimately tied to the MATLAB path issue #127. I will try to fix up paths as managed by POUNDERS and its tests to get this working. Requirements
|
pounders.m and its tests often add folders to the MATLAB path but do so using relative paths, which can influence from where you can call the code. The changes here adopt a different path strategy using paths relative to the file that is adding to the path. This is related to Issue #127. A second goal is to make it so that users don't have to add too many paths. Confirmed that the full test suite can be run as detailed in its inline documentation. This includes creating an HTML coverage report. Confirmed that changes to the path made by tests are not present upon termination. Ran each single test individually with a clean MATLAB environment to confirm that they run through with and only with the documented path requirements. Confirmed that they leave the path as found upon entry.
Changes analogous to those made for POUNDERS in commit ba4fbb1. Tested in similar way. See reference commit's message for more details. Additionally confirmed that if I run MATLAB tests with coverage enabled from the root folder, that all MATLAB tests in IBCDFO were run and all results included in a single coverage report.
I am getting a Commit creating failed: ["Service not found: none"] failure in CodeCov. Some issues online make it sound like this is due to git not having the correct safe directory set. The checkout action is setting safe directories to both of the repos. However, these are not being set for the default folder due to my custom installation of two repos. Setting the default workspace as safe to see if this helps. This is where the reports are and where code cov is running from (AFAIK).
I have updated manifold sampling as well so that in theory it could be tested with coverage in the action as well. However, it has an external dependency to the I would like to avoid having a CI action that logs into FileExchange with an account since that is more complex and I prefer to avoid potential security issues. A few other possibilities to explore:
Note that use of Projects/Toolboxes should be investigated simultaneously with the MATLAB path management Issue #127. |
I've broken both POUNDERS and manifold sampling tests so that I could see both fail when running the test from the root of the repo. However, only the POUNDERS test should fail in the GH action since the action isn't running any manifold sampling tests. THIS SHOULD BE REVERTED!
Ran with BenDFO in default location and saw it pass. Moved clone to different location and saw it fail. Set BenDFO env var to wrong path and saw it fail. Set env var to correct location and saw it pass.
Also try to get MATLAB coverage to include all tests.
In particular, we should not include coverage of the MINQ submodule in coverage.
Each test log can be quite long. This makes it easier to review the logs and quickly zero in on failures.
If all goes well, this would be addressed in Issue #157.
Merged into |
Check to see if MATLAB tests are being automatically run in GitHub actions. If not, then implement this including (hopfully) code coverage.
The text was updated successfully, but these errors were encountered: