K-溜溜的答案找到了我朝着正確的方向,但還遠不是成功的。這是我所需要的:
首先在我.travis.yml:
language: ruby
rvm:
- 2.1.1
before_script:
- psql -c 'create database spokenvote_test;' -U postgres
- cp config/database.travis.yml config/database.yml
- rake db:test_prep
- npm install karma
- npm install karma-jasmine
- npm install karma-coverage
- npm install karma-phantomjs-launcher
- npm install karma-coffee-preprocessor
script:
- bundle exec rspec speC# basic for ruby
- node_modules/karma/bin/karma start config/karma.conf.js --single-run --browsers PhantomJS
然後我也放在這個代碼在我的package.json,雖然我如果需要它不知道:
"devDependencies": {
"karma": "~0.12",
"karma-jasmine": "~0.2",
"karma-coverage": "~0.2.6",
"karma-phantomjs-launcher": "~0.1.4",
"karma-coffee-preprocessor": "~0.2.1"
},
最後,我才知道,特拉維斯是大小寫敏感的,所以:
'bower_components/jquery/dist/jquery.min.js',
中是需要我karma.conf.js
:
'bower_components/jQuery/dist/jquery.min.js',
FYI https://github.com/travis-ci/travis-ci/issues/4090運行這兩個命令,指示他們不會很快支持它的任何時間。 – Jeff