Skip to content
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

Improve code testing by contributors using GitHub actions #2301

Open
robertoostenveld opened this issue Aug 24, 2023 · 3 comments
Open

Improve code testing by contributors using GitHub actions #2301

robertoostenveld opened this issue Aug 24, 2023 · 3 comments
Labels
summer project MATLAB for Neuroscience Summer Project

Comments

@robertoostenveld
Copy link
Contributor

Description: Add GitHub actions to automatically run a large subset of the tests on pull requests. Then the contributor will receive a message on the tests that failed and need further inspection.

The test scripts can possibly run in the cloud. If that is not the case, then the contributor will be asked if they want to download the data on their local computer. Note, these test scripts can run only on PUBLICDATA/NODATA.

@robertoostenveld robertoostenveld created this issue from a note in MATLAB Community Toolbox Training Projects 2023 (Stretch Goals) Aug 24, 2023
robertoostenveld added a commit to robertoostenveld/fieldtrip that referenced this issue Aug 24, 2023
This uses a github action and python script to add a comment to the
pull request with the suggested test scripts. The suggestion is
based on seacrhing for "DEPENDENCY" on any of the changed files.
Furthermore, it splits them in internal and external tests based
on the "DATA" requirement of the test scripts.

It is probably not yet optimal in the sense that it will rerun upon
every update to the PR.
@robertoostenveld
Copy link
Contributor Author

I implemented a github action based on https://github.com/marketplace/actions/create-or-update-comment, which automatically adds a comment to the pull request. The content of the comment comes from a python script that finds the appropriate test scripts.

@robertoostenveld robertoostenveld added the summer project MATLAB for Neuroscience Summer Project label Aug 24, 2023
@robertoostenveld robertoostenveld moved this from Stretch Goals to In progress in MATLAB Community Toolbox Training Projects 2023 Aug 24, 2023
@vijayiyer05
Copy link

I believe you already know, but just in case: this issue could leverage the open availability of MATLAB on GitHub Actions for public codebases.
image

If any questions or issues arise on this, please don't hesitate to reach out.

robertoostenveld added a commit to robertoostenveld/fieldtrip that referenced this issue Aug 24, 2023
robertoostenveld added a commit that referenced this issue Aug 24, 2023
robertoostenveld added a commit to robertoostenveld/fieldtrip that referenced this issue Aug 24, 2023
@robertoostenveld
Copy link
Contributor Author

I have been trying out this action in #2302, #2303, #2304, #2305 and #2306.

It was only in #2306 that I got it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
summer project MATLAB for Neuroscience Summer Project
Development

No branches or pull requests

2 participants