-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Can we "Test" the tests/examples, by running them on GitHub Actions? #450
Comments
Yes its on the roadmap to use GitHub Actions. FWIW all samples listed in projects.conf are tested regularly locally via the test_all.sh script. |
Awesome to hear! Thanks for the insight. Looking forward to seeing these on Actions. Samples being run on Actions will also, in a way, help contribute to the stability of emulators on Github's infrastructure. |
I tried to make GMD screenshot test with Github action work https://github.com/hannesa2/testing-samples/pulls but till now, I found no working action. Eg. hannesa2#1 with untouched code and local working gradle command I run into
I've no clue why |
@hannesa2 where ist the gradle task Over at GnuCash Pocket I use gradle-build-action and android-emulator-runner which works quite well... BUT I cannot get the instrumentation tests to behave deterministically.. |
@djbrown I haven't taken a glance at your code, but the stability is likely related to the Github Infrastructure than your code setup. The But -- you can check this out because there is another official Android repo which is running instrumentation tests here https://github.com/android/architecture-samples/actions/runs/3461542977/workflow |
If I have time this week, I'll submit a PR to run all of the samples in a build matrix. |
@djbrown All my pull requests using this definition |
@mrk-han In a lot of other repos I do Espresso tests, eg this or here and they work more or less stable. Only api30 devices tend to flakiness |
@hannesa2 They are passing VM acceleration check because of the new default hypervisor framework that is now leveraged by the Emulator. If I am not mistake, this is not the same as GPU acceleration. (Hardware Acceleration has 2 facets, GPU and VM acceleration) And yes, M1 is not supported yet unless there you configure a self-hosted M1 laptop, which I believe is still somewhat experimental. |
Also, accel-check fails depending on where you run it from, the test done here: ReactiveCircus/android-emulator-runner#286 (comment) New tooling ( |
Just put up a test PR on my branch here, likely will need more optimization. It's already failing because I accidentally removed the I'm wondering a few things: @brettchabot What is the easiest way to add testOptions to our emulator after creating it with GMD? Is there a way to provide emulator options in the It's also somewhat common to change the
It would be nice to support that if possible for GMD with the ATP images. Lastly, is there a way to specify SKIA rendering from the testOptions? Ideally on GitHub Actions we can run with macOS agents to use the default hypervisor, and then run with swiftshader_indirect GPU acceleration (because I don't think GPU Host is possible), and I'd like to experiment with SKIA rendering if that would help in the absence of GPU Acceleration. |
There is no need to put something on top of you stuff.
I use it since months gitx/gitx#314 and it's fast. Please can we skip this now and concentrate to make this |
I'm not sure what you mean by this, can you reiterate?
Yes -- Hypervisor works without HAXM because of the latest improvements by the emulator team to take advantage of the new 1st party hypervisor provided by apple https://developer.apple.com/documentation/hypervisor
Not sure this is a great example of the types of UI tests that will be run in this suite (You are just sleeping and taking a screenshot), but I am glad it has been stable for you!
That's a lot of what this PR will help show
You're using M1 runners on MacStadium though, is that free with OSS? |
Btw, I asked the maintainer of Malinskiy/action-android#76 (comment) |
This is literally what I just asked above.
Yes, his action has nothing to do with GMD and his opinion is subjective on where this problem should be solved.
It is fairly well known that Github's default runners are not very powerful. Google has released the ATD images which will help reduce CPU load. This PR to get these core UI tests running on GitHub Actions is a step in the right direction to see if we can get these stable on Github's default runner infrastructure. For any of your concerns with GMD stuff, you should create a separate issue. I asked @brettchabot here because the GMD is still very new and that is the biggest reason people are shying away from it for now. It requires alpha versions of tooling (8.0.0 alpha) to connect to firebase test lab. But it will be a huge improvement for the ecosystem once polished. Starting and running emulators on CI has been a pain for years. |
Made a bit more progress, latest build is running here -> https://github.com/mrk-han/testing-samples/actions/runs/3483003666 |
@brettchabot Can you look into why these are failing? Is there an easy way around this?
|
@yuuki3655 It looks like something (GMD/AGP?) is producing a file with a double quote in it, which the uploader treats as invalid |
That log file is produced by UTP core and the file name needs to be escaped. I filed a bug for tracking. https://issuetracker.google.com/263305468 |
@yuuki3655 @brettchabot Hope you are both doing well! I updated my fork with main and checked again to see if this is still happening. I'm mainly wondering if this is going to cause problems with more projects using GMD/AGP on macOS agents with Github -- or if for some reason it'd be something specific to this repo which is causing the problem. |
FWIW - github/android/android_test has been using GMD+GitHub actions for a while now and it has been working well. Although it is now using the paid large Linux runners - the same setup on the macos free tier machines had a ~10% flakiness rate when we last tried them. |
Ahhh, that's interesting. Probably an OS issue then? I'm so glad to see it using the Larger Runners. I've had to swap all of my projects to them as well, and the stability has been incredible. Curious, is that group using the 4-Core Ubuntu runners? I think 2-Core will have KVM access soon which could decrease costs if they're also stable (assuming Google is paying for the Larger Runners) |
either an OS issue or a case where machines are just underpowered. I think the 'large runners' group is 4 core but I'm not sure. |
Would this repo also be able to access those Larger Runners at this time, or would we need to have y'all's Github Org Owner add this repo to the list of repos with access to the runners first? If we can get this on larger runners, I can put up a PR today or tomorrow and get this repo ported over to GHA. |
This repo should have access to the 'large runners' pool. I believe I requested it at the same time as access for github/android/android_test. |
I'll try to put up a PR asap then. It could be beneficial to get Now In Android on the Larger Runners as well. At the least, it would show a more proper way of getting reliable test results on GHA, and leave users less frustrated with emulators + CI who go to that repo for access to the "latest and greatest" ways of doing things. |
Some of the samples are 4+ years old, would it make sense to "test" these tests in GitHub Actions to make sure they're working?
It would add a lot of confidence when following some of the patterns in the examples
The text was updated successfully, but these errors were encountered: