meffie / molecule-proxmox

Molecule driver for Proxmox VE
MIT License
36 stars 8 forks source link

CI Testing #22

Open IamLunchbox opened 1 month ago

IamLunchbox commented 1 month ago

Would you consider automating tox tests of changes to this repository through a CI pipeline?

In the current setup that would deduct either CI minutes from your personal github account though. Maybe that changes for orgs, but I don't know more until i check the docs.

Otherwise, this would require a public proxmox instance, which i could take a look at. And as a last resort I could either host a drone runner easily or take a look at the self hosting of other runners, e.g. github.

meffie commented 1 month ago

That would be helpful. A real test would require a proxmox instance, so I'm not sure how that could be setup.

Currently, I run the pytests via tox against a proxmox instance running in my homelab.

The environment variables required to run the tests are listed in the README file.


From: IamLunchbox @.***> Sent: Friday, September 20, 2024 11:30 AM To: meffie/molecule-proxmox Cc: Subscribed Subject: [meffie/molecule-proxmox] CI Testing (Issue #22)

Would you consider automating tox tests of changes to this repository through a CI pipeline?

In the current setup that would deduct either CI minutes from your personal github account though. Maybe that changes for orgs, but I don't know more until i check the docs.

Otherwise, this would require a public proxmox instance, which i could take a look at. And as a last resort I could either host a drone runner easily or take a look at the self hosting of other runners, e.g. github.

— Reply to this email directly, view it on GitHubhttps://github.com/meffie/molecule-proxmox/issues/22, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIPBUX54OW3AM5OXR6VNLLZXQ5STAVCNFSM6AAAAABOSIZ5K2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTSMJQGIZDAMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

IamLunchbox commented 1 month ago

Yeah, i do tests similarly. And a cloud instance with paravirtualisation would either be very slow or expensive - unless theres a ci hook, which spawns and configures the node on demand.

I checked the github runner docs. Especially since a github runner does not require inbound https traffic i am inclined to go that route and provide access to a limited pool on my node.

But first ill need to go through the security docs of self hosted runners. There are some pitfalls, especially with foreign PRs and their potentially malicious code.

Sep 20, 2024 21:19:18 Michael Meffie @.***>:

That would be helpful. A real test would require a proxmox instance, so I'm not sure how that could be setup.

Currently, I run the pytests via tox against a proxmox instance running in my homelab.

The environment variables required to run the tests are listed in the README file.


From: IamLunchbox @.***> Sent: Friday, September 20, 2024 11:30 AM To: meffie/molecule-proxmox Cc: Subscribed Subject: [meffie/molecule-proxmox] CI Testing (Issue #22)

Would you consider automating tox tests of changes to this repository through a CI pipeline?

In the current setup that would deduct either CI minutes from your personal github account though. Maybe that changes for orgs, but I don't know more until i check the docs.

Otherwise, this would require a public proxmox instance, which i could take a look at. And as a last resort I could either host a drone runner easily or take a look at the self hosting of other runners, e.g. github.

— Reply to this email directly, view it on GitHubhttps://github.com/meffie/molecule-proxmox/issues/22, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIPBUX54OW3AM5OXR6VNLLZXQ5STAVCNFSM6AAAAABOSIZ5K2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTSMJQGIZDAMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub[https://github.com/meffie/molecule-proxmox/issues/22#issuecomment-2364410976], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ANRA34KHPNQCN3MAFEWJ4GLZXRYLLAVCNFSM6AAAAABOSIZ5K2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRUGQYTAOJXGY]. You are receiving this because you authored the thread. [Tracking image][https://github.com/notifications/beacon/ANRA34M2GEEGDLWC52TET7TZXRYLLA5CNFSM6AAAAABOSIZ5K2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUM5YGGA.gif]

meffie commented 1 month ago

For the CI pipeline, perhaps we could somehow use pytest to mock the proxmox api we use. It would not be an end-to-end test, but it would give us some code coverage.

IamLunchbox commented 1 month ago

Yeah maybe that is easier for now - or rather for the foreseeable future - i think this is not a high priority issue.