-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add docker testing #62
Conversation
For running priviledged actions, refer to actions/container-action#2 (comment) |
Looks like this is not happening with github actions for now: actions/runner-images#183 |
TODO: check if this helps https://www.ubicloud.com/use-cases/github-actions |
Hello @spion , how's it going? I have a question, since you're trying to combine emulator and docker, why exactly do you need docker? Dockerfile is basically a script with extra tools. You can install whatever tools you need on GHA Ubuntu machine and then run your Is it because of libfuse? Is Docker needed in order to use libfuse on GHA? |
Its so I can also run the tests locally (with multiple android versions, as well as multiple versions of ubuntu/fuse/etc) without having to rely on GHA. But I'm probably going to be reworking that bit to use separate containers for the emulator and the filesystem "host" |
The way I see it, you need docker to be able to test locally on different ubuntu/fuse versions. Just because you need that, it doesn't mean that the script should ONLY be callable through docker. You could use docker locally, and plain naked script in GHA. Both still calling the same adb calls. With GHA you get an easy way to set up a test matrix with all relevant android versions and maybe even fuse versions, if different fuse versions are easily reachable through apt-get or whatever. Keep in mind that GHA Android emulators are x86/x86_64. I haven't tried anything with the new macos armv8 images, maybe they would allow armv8 emulator images in addition to ubuntu's x86/x86_64. Let me know if you want help here on the emulator or GHA |
Yeah, the script is already called directly in GHA now from an action that sets up the emulator. The code is a year old and went through quite a few iterations - my main goal yesterday was to get it working in case there is a new influx of contributions but there is some cleanup left to do for sure 😅 |
This PR adds a scaffold for automated tests based on docker and an android emulator. The neat thing about this approach is that we can also use multiple versions of android, and while that may not be fully exhaustive in terms of the devices out there, its way better than having nothing.
Without tests, changes to this project are quite high risk. With tests, I think we can get things going 😄
Currently covers only a single Android version, but its easy to add a second dockerfile.
To try it out
The reason
--privileged
is needed is because the android emulators need virtualization support (/dev/kvm needs to be available). I'm still hoping we'll be able to run these in GitHub actions but I've not tried yet.This is WIP. Would be great to have some ideas about good representative tests to run and ways to verify that everything is ok.