Closed jdenholm closed 1 year ago
Yep, happy to do this. Let me know the branch.
Just main, for now. I'm going to tag dorchard and mondus once they accept, and when you give the all clear I will create a dev branch.
A couple of comments:
You are checking multiple OS and python versions via a matrix which is fine, but every copy of this runs black, pylint, and pydocstyle. Consider moving all of the operations that only need to run once into a separate workflow. For an example see the GZ21_ocean_momentum_CNN workflows.
At the moment if one job fails they all fail (I think?), meaning that you might fix pylint errors, only to be met with MyPy errors etc. You can add an if: always()
to force jobs to run even if others fail before delivering a final report of everything that went wrong. Again, see GZ21_ocean_momentum_CNN workflows.
Since I'm not versed in conda I can't comment on this aspect, but assume it works OK.
You could consider using the official black action rather than running it yourself:
- name: Assert that code matches Black code style
uses: psf/black@stable
Do you want this to run on every push, or would it be better to restrict to specific actions (e.g. pushing to main or pull requests)? e.g.:
on:
# run on every push to main
push:
branches:
- main
# run on every push (not commit) to a PR, plus open/reopen
pull_request:
types:
- synchronize
- opened
- reopened
Would you mind taking a look at the basic GitHub workflows and checking they are okay, please? If so I will create a dev branch.