首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用使用SASS的AngularJS应用程序Travis进行测试

用使用SASS的AngularJS应用程序Travis进行测试
EN

Stack Overflow用户
提问于 2014-05-12 16:12:15
回答 1查看 1.8K关注 0票数 3

我不明白为什么我的TravisCI构建在编译SASS文件时总是失败(节点0.10)。

我一直收到同样的错误:

代码语言:javascript
复制
Running "concurrent:test" (concurrent) task
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.

Aborted due to warnings.

但是我已经安装了sass和grunt-contrib-sass,从我的.travis.yml中可以看到

代码语言:javascript
复制
language: node_js                                                                                                                              

before_install:                                                                                                                                
  - gem install sass                                                                                                                           

node_js:                                                                                                                                       
  - '0.8'                                                                                                                                      
  - '0.10'                                                                                                                                     

before_script:                                                                                                                                 
  - 'npm install -g bower grunt-cli karma'                                                                                                     
  - 'bower install'                                                                                                                            

script: grunt    

和我的package.json (节选)

代码语言:javascript
复制
"grunt-bower-install": "~1.0.0",                                                                                                          
"grunt-concurrent": "~0.5.0",                                                                                                              
"grunt-contrib-clean": "~0.5.0",                                                                                                           
"grunt-contrib-compass": "~0.7.2",                                                                                                         
"grunt-contrib-concat": "~0.3.0",                                                                                                          
"grunt-contrib-connect": "~0.5.0",                                                                                                         
"grunt-contrib-copy": "~0.4.1",            

有人知道会发生什么吗?

链接到我的Travis构建:https://travis-ci.org/dmatteo/ng-bootstrap-pure/builds

附注:当然,我的地区grunt正在测试和构建完美的

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-13 13:11:47

看起来仅仅安装sass是不够的,而compass是必需的。此外,我需要指定需要图形用户界面,这是在before_install的前两行中完成的

所以,这是工作的.travis.yml

代码语言:javascript
复制
language: node_js

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - gem install sass
  - gem install compass

node_js:
  - '0.10'
  - '0.11'

before_script:
  - 'npm install -g bower grunt-cli karma'
  - 'bower install'

script: grunt
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23613902

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档