Testing Meteor with Velocity at Codeship

2019-04-13 04:25发布

问题:

I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship.

Local:

I20141208-12:29:42.602(2)? Started
I20141208-12:29:42.602(2)? .
I20141208-12:29:42.603(2)? 
I20141208-12:29:42.603(2)? 1 spec, 0 failures
I20141208-12:29:42.603(2)? Finished in 0.014 seconds
PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote

Codeship:

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While Building the application:
node_modules/velocity-cli/velocity-cli.js:1:15: Unexpected token ILLEGAL

=> Your application has errors. Waiting for file change.

Setup commands:

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 

Test commands:

meteor --test

回答1:

Ahoy,

velocity-cli needs to be install globally. Could you add the following command to your setup steps before you call the meteor executable?

npm install -g velocity-cli

Disclaimer: I'm working for Codeship



回答2:

did you try

meteor run --test

command? This is what velocity-cli creators are telling to do now.



回答3:

I got it working by changing the setup commands from the OP to the following :

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=$HOME/.meteor:$PATH
npm install -g velocity-cli

Also, for what it's worth I am using cucumber instead of jasmine and this still applies.