gecos-lab / PZero

GNU Affero General Public License v3.0
22 stars 2 forks source link

automatic testing #43

Open andrea-bistacchi opened 1 year ago

andrea-bistacchi commented 1 year ago

We need to create an automated testing system, possibly using GitHub actions and pytest with pytest-qt.

I think some useful example can be found on the PyVista repository.

mcbaguetti commented 1 year ago

For using GitHub Actions we need to enable it in the settings (I don't think I have permission to do that) the actions tab inside this repository as explained here

andrea-bistacchi commented 1 year ago

Hi, these are options for general actions:

Actions permissions

  1. Any action or reusable workflow can be used, regardless of who authored it or where it is defined.
  2. The Actions tab is hidden and no workflows can run.
  3. Any action or reusable workflow defined in a repository within andrea-bistacchi can be used.
  4. Any action or reusable workflow that matches the specified criteria, plus those defined in a repository within andrea-bistacchi, can be used. Learn more about allowing specific actions and reusable workflows to run.

I guess 1 is not a good idea, and we must choose between 3 and 4. Let me know what we need.

mcbaguetti commented 1 year ago

I would enable option 4 because the number 3 allows us to use only the actions we created. Inside option 4 we need to allow for actions created by GitHub, Trusted-Authors and in the list we need to provide these three additional actions: conda-incubator/setup-miniconda@v2, enricomi/publish-unit-test-result-action/composite@v2, enricomi/publish-unit-test-result-action@v2,

The first action is to set up conda, the other two are for displaying test results.

Example: image

andrea-bistacchi commented 1 year ago

Done!

mcbaguetti commented 1 year ago

Hi Andrea, when you have time, you can delete from the Actions Permissions these two old lines that we don't use anymore:

enricomi/publish-unit-test-result-action/composite@v2,
enricomi/publish-unit-test-result-action@v2,

and add this line for re-use our GitHub workflow (for the future the general command is OWNER/REPO/PATH/FILENAME):

andrea-bistacchi/PZero/.github/workflows/release.yml
andrea-bistacchi commented 1 year ago

Hi, done. Now the allowed actions are:

conda-incubator/setup-miniconda@v2,
andrea-bistacchi/PZero/.github/workflows/release.yml
andrea-bistacchi commented 9 months ago

We have a problem with mamba for Mac OS. Also the architecture should be checked (Intel vs. M1).

https://github.com/andrea-bistacchi/PZero/actions/workflows/testing.yml

andrea-bistacchi commented 7 months ago

Mamba 1.5.3 has been released for all platforms. We should check whether this solves the issues with MacOS.

andrea-bistacchi commented 2 weeks ago

libmamba is now the standard (since conda 23.10) but this does not solve the problems with MacOS.

We have decided not to test and deploy executables for MacOS for some time.