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

Automated tests via github actions for repositories generated from this template #36

Open
4 tasks done
famosab opened this issue Oct 28, 2022 · 3 comments
Open
4 tasks done

Comments

@famosab
Copy link
Collaborator

famosab commented Oct 28, 2022

Description of the issue:

Github actions allows running various jobs in the background when working with a repository. So far this template only offers structure but no automated testing.

Expected feature/value/output:

The idea would be to make use of github actions with a small actions script that f. ex. runs memote every time a changed model file is pushed to the repository and then adds the memote report to the repository so that the user can pull the updated report and learn something new about their model.

Current feature/value/output:

Not available.

Proposed code:

Basically something along the lines of

    - name: Install dependencies MEMOTE
      run: python -m pip install memote

    - name: Create memote report 
      run: |
        memote report --filename "GEM_status.html" model/<model_name>.xml 

I hereby confirm that I have:

  • Tested my code with all requirements for running the model
  • Done this analysis in the master branch of the repository
  • Checked that a similar issue does not exist already
  • If needed, asked first in the Gitter chat room about the issue
@mihai-sysbio
Copy link
Member

Thanks for opening this issue @famosab, it would a useful addition.

Practically speaking, I guess this could take the shape of one or several workflows in the .github folder that already exists.

Some concerns that can be raised are:

  • what happens when / if actions fails (for any reason)? Whose responsibility would it be to fix these?
  • how would these actions work in other platform such as Gitlab?
  • would a Memote report then exist on every branch? this was a problem in the past, when every report was picked up as new content, so every report grew the size of the repository by 1MB or so.

@famosab
Copy link
Collaborator Author

famosab commented Nov 2, 2022

I have some ideas concerning your points:

  • We could either implement these actions as a guideline / template how to build a github action script that works with GEMs or we program a github action that can be maintained in the background without any edits in singular repositories.
  • I would suggest a Memote report that either gets replaced everytime and only exists on the main branch (and maybe a development branch when people want to work on singular issues and cross-validate) or a Memote report such as the one that used to be implemented with the Memote online command (which is not working at the moment, see Issue #706).

@JonathanRob
Copy link
Member

Just a recommendation regarding the issue with large HTML report sizes - one option is to use the JSON output, and specify a subset of tests to run, rather than running everything by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

3 participants