Using lxc/lxd/multipass to run github action tests on bespoke linux operating systems

Currently github actions only supports ubuntu for linux, however I’d like to test my project on several operating systems. I’m already using multipass on my macos dev machine and it worked terrifically.

I came across https://fedoramagazine.org/github-actions-use-podman-to-run-fedora-linux/ which uses podman inside a github action to run tests on fedora. I’m wondering if such could instead be possible with lxc/lxd/multipass inside the ubuntu github action environment?

Yep :slight_smile: we do it for our own tests.

https://github.com/canonical/lxd/blob/main/.github/workflows/tests.yml

You may want to install the snap package though to save building it though like we do.

And you’ll want to remove docker from the runner to avoid any egress firewall issues:

https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker

1 Like