carrot / ship

⛔️ currently unmaintained ⛔️
Other
151 stars 14 forks source link

Cordova deployer #68

Open zspecza opened 9 years ago

zspecza commented 9 years ago

I'm not too certain on the best way to test this quite yet, but manual testing works as expected, so if you guys would like to check this out, here's a PR :)

/cc @jenius @kylemac

jescalan commented 9 years ago

This is awesome! Can't wait to get this merged in. We definitely need at least basic test coverage beforehand, but really great job getting this working :tada:

zspecza commented 9 years ago

This is kind of difficult to test because of how it relies on the various app development SDKs being present - although since this is largely part of cordova's functionality (which is already tested) it shouldn't be that important to test those bits - the only thing that this does is call cordova, essentially - and copy/remove a few files. I'm not so sure how exactly the best way to go about testing this is. Can I expose the functions I've created in the deployer for the sake of the tests?

zspecza commented 9 years ago

Okay, I've managed to get a test in that checks the existence of the project after it has been created. I figured this one test is enough to work with, because the way the commands are built is composable, so if one command works, the rest should too, and those commands are already tested by the cordova dudes. I also added an option that prevents the generation of a built app (otherwise we would have to add the android sdk tools to travis, lol...) so the test isn't as slow - but it's still pretty slow.

I'm not sure why this is failing though, according to the Travis log:

The command "openssl aes-256-cbc -k "$secret" -in config.coffee.enc -d -a -out config.coffee" failed and exited with 1 during .

I don't think this has anything to do with this deployer, the test passes locally, so I think this is ready for merge :)

kylemac commented 9 years ago

@declandewet that has to do with a before_script we have in .travis.yml to decrypt our config.coffee. It's not working for me locally either, so we'll look into it and figure out what's going on.

zspecza commented 9 years ago

Thanks doge :+1:

jescalan commented 9 years ago

Hey guys, any update here? Would love to get this merged up if we can!

zspecza commented 9 years ago

Get that before_script working and the tests should all pass :)