3

Can anyone recommend a good setup script to deploy to Modulus after passing tests?

Right now I'm using:

nvm install 0.10.28
nvm use 0.10.28
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version

Which is basically what I've managed to copy + paste around the interwebz and I have no idea what I'm doing.

Finally my test pipeline is:

meteor --test

The output from CodeShip logs:

I20150515-13:34:16.005(0)? [velocity] mocha is starting a mirror at http://localhost:44995/.
I20150515-13:34:16.006(0)? [velocity] This takes a few minutes the first time.
I20150515-13:34:16.006(0)? [velocity] You can see the mirror logs at: tail -f /home/rof/src/bitbucket.org/atlasshrugs/garden/.meteor/local/log/mocha.log
PASSED mocha : Server initialization => should have a Meteor version defined

As soon as it gets to the client-side tests, it hangs for ever and fails to build.

Any suggestions?

ilrein
  • 3,833
  • 4
  • 31
  • 48
  • Can you give us a better idea of what you would like your workflow to be exactly? It looks like you are installing Meteor, then running tests... and that's it. – Tim C May 15 '15 at 15:41
  • That's what I'm doing because I'm trying to self-teach myself. I have no idea what I'm doing! I think my goal is that everytime I push to my Bitbucket, I want Codeship to run the tests, and if they pass, to deploy to Modulus after. – ilrein May 15 '15 at 15:47
  • That's a great goal honestly! So mocha is completing. What are you using for client-side tests? – Tim C May 15 '15 at 15:53
  • Thanks! I'm using Mocha for client tests as well. I'm noticing an error message too: stream error Network error: ws://localhost:3000/websocket: connect ECONNREFUSE. There must be a connection here, the client tests just hang forever and the build fails. I tried adding browser-policy as suggested at http://stackoverflow.com/questions/26866008/mocha-web-client-side-tests-not-running-with-velocity-for-meteor-application?rq=1 (and adding that block of code to Meteor.startup) but no go so far. – ilrein May 15 '15 at 16:02
  • I am not super familiar with codeship. However, I wonder if they have trouble with the mocha web driver or some such. I noticed they have a number of blog posts about various new browser test integrations but they did not mention mocha. – Tim C May 15 '15 at 16:35
  • Ah. Thank for checking it out for me. Some of the drawbacks using cutting edge tech...need the docs to catch up. I guess I'll have to look into alternatives. – ilrein May 15 '15 at 16:44
  • 1
    I don't want to say it's not possible :) maybe someone from codeship will pipe up and help. It looks like you can tweet them @codeship and ask about mocha browser testing too. – Tim C May 15 '15 at 16:49
  • Ahoy, Marko from the Codeship crew speaking. See https://gist.github.com/jhgaylor/ef5f2748b7b9b94ded46 for a gist for the complete walkthrough, though this doesn't include the testing part. As for mocha, it should work :) That said, could you get in touch via our in app messenger and send us a link to the project, so I can take a look at the full build log? Thx! – mlocher Jun 22 '15 at 08:08

1 Answers1

3

According to the Velocity readme you should use this command: meteor --test --release velocity:METEOR@1.1.0.3_1. I did manage to get it work using the following setup commands:

nvm install 0.10.30
nvm use 0.10.30
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false 
/g"meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version

and this test command (replacing the with the path to the Meteor app directory. In this case sanjo:jasmine is required, but if you use another tester, you might need to add the related package. The velocity:html-reporter package is overkill for this purpose, but it does works, the console reporter should be enough, but I didn't test it):

cd ~/src/bitbucket.org/<path>/ && 
meteor add sanjo:jasmine velocity:html-reporter && 
meteor --test --release velocity:METEOR@1.1.0.3_1
Oizor
  • 46
  • 2