NixOS / calamares-nixos-extensions

NixOS calamares [maintainer=@vlinkz]
25 stars 23 forks source link

Unit tests for modules/nixos/main.py #44

Open lulu-berlin opened 1 month ago

lulu-berlin commented 1 month ago

Is my assumption correct that there are no unit tests for modules/nixos/main.py?

I think it would have probably been possible to catch the swapon bug (#34 fixed in #36) with a unit test and also to avoid future regressions.

What do you think? Would it be possible to add a CI (maybe github actions) to this project that would run such tests? I'm willing to make a PR and scaffold some tests if that's welcome.

nixos-discourse commented 1 month ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/unit-tests-in-calamares-nixos-extensions/49587/1

emilazy commented 1 month ago

Yes, I think more automated testing would be fantastic if you’re up for helping out. We don’t have as many resources to maintain the graphical installer as we’d like currently.

lulu-berlin commented 1 month ago

Thank you, @emilazy. I'm definitely up for helping out.

May I set up github actions to run the tests?

emilazy commented 1 month ago

It’s great to have more people interested in helping out with the installer :)

I’m not sure if any particular permissions on the repository are required to set that stuff up, but @vlinkz and @ElvishJerricco have admin access to it so if you sent a PR with CI machinery I’m sure they’d be happy to review it and do whatever is necessary to get it set up.

lulu-berlin commented 1 month ago

Ok, I'll get to it :)

lulu-berlin commented 1 month ago

I have created a pull request (#47) with one unit test and all the boilerplate.

I'm looking forward to getting to your feedback :)

@vlinkz @ElvishJerricco