rnc-archive / react-native-statusbar

Native module for mutating status bar state
MIT License
78 stars 14 forks source link

Add detox test and improve CI #14

Closed dmtrKovalenko closed 5 years ago

dmtrKovalenko commented 5 years ago

Closes #10

dmtrKovalenko commented 5 years ago

Yep, @cpojer I am still in progress. Will add a [WIP]

dmtrKovalenko commented 5 years ago

Also closes #15 by https://github.com/react-native-community/react-native-statusbar/pull/14/commits/2e0abee3d8453533efd58231eddf7c37d4dfd77d

cpojer commented 5 years ago

cc @matt-oakes do you think you could help @dmtrKovalenko? He was asking how to sign the Android apk on CI for testing.

dmtrKovalenko commented 5 years ago

Thanks @cpojer I realized how to do so, but now get a new one problem :)

matt-oakes commented 5 years ago

@dmtrKovalenko Let me know what the issue is and I'll try to help out

dmtrKovalenko commented 5 years ago

Thanks a lot @matt-oakes I mostly take your circleci config. And now for some reason step with waiting for adb simulator start is completing, but launching tests fails, as if there is no simulator :(

matt-oakes commented 5 years ago

It looks like you haven't correctly setup Detox by linking the correct libraries and adding the required JUnit test files. The guides to do that are here:

iOS: https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md Android: https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md

Let me know if those don't work.

dmtrKovalenko commented 5 years ago

@matt-oakes I am still need your help... I have even used the orb for sharing configs, but nothing helps, am I missing something? Have never run android tests on detox before, can you please advise me why the detox cannot find the device? On my local machine now everything works file with release .apk

dmtrKovalenko commented 5 years ago

@cpojer and @matt-oakes. I am really out of ideas why it doesn't work... I am doing everything same, step-by-step, with the same environment and cleared caches. Android tests works fine for me. Can I ask for help?

dmtrKovalenko commented 5 years ago

Now it's using custom android test+build job, which just runs detox build and detox test for testing, and still detox not reflecting apk and falling out of timeout 😢

dmtrKovalenko commented 5 years ago

I suppose I will just disable android detox test running on CI for now :) I am really don't understand what's going wrong on circle, everything starts for me even in rn-community docker container

bartolkaruza commented 5 years ago

I have a similar issue on cameraroll here:https://github.com/react-native-community/react-native-cameraroll/issues/4 with @matt-oakes inital stab at the problem in a WIP PR here https://github.com/react-native-community/react-native-cameraroll/pull/6

rborn commented 5 years ago

@dmtrKovalenko please check that the emulator is started on CI before the test runs. I had this (using genymotion) and had to add basically a script that would start it for me.

However that was on my own machine and not CircleCI 😕

dmtrKovalenko commented 5 years ago

@bartolkaruza All steps from the PR you linked are already done in this project @rborn the shared orb already contains script that waits for avd to boot

dmtrKovalenko commented 5 years ago

Ohhhh my god, the reason was timeout 120s. I have increased it to 300. ezgif-4-6c1857dfd6c0

dmtrKovalenko commented 5 years ago

....

matt-oakes commented 5 years ago

Glad you got this working!

Just so you know, this will fail in 60 days unless we get the CircleCI Orb published correctly. I'm waiting on a discussion to happen about permissions before I can publish it fully. The dev version will work fine for now though 👍