2016-08-22 103 views
1

我通過語義釋放已經產生了travis.yml文件,它看起來像這樣:特拉維斯CI生成錯誤

sudo: false 
language: node_js 
cache: 
    directories: 
    - node_modules 
notifications: 
    email: false 
node_js: 
    - 'iojs' 
before_install: 
    - npm i -g [email protected]^2.0.0 
before_script: 
    - npm prune 
    script: 
    - npm run test:single 
after_success: 
    - npm run semantic-release 
branches: 
    except: 
    - /^v\d+\.\d+\.\d+$/ 

做一個混帳推後,我得到以下特拉維斯錯誤:

ERROR: An error occured while trying to parse your .travis.yml file. 
Please make sure that the file is valid YAML. 
http://lint.travis-ci.org can check your .travis.yml. 
The log message was: Build config file had a parse error: did not find expected '-' indicator while parsing a block collection at line 13 column 3. 

在電子郵件特拉維斯我也收到以下系統消息:

系統消息: 我們看到,由於建造新啓用sudo的精確的和可信賴的我失敗法師。查看更多詳情here。感謝您持久的耐心。

那麼在我的travis.yml文件中是否有錯誤,或者是其他的東西?

由於 蘇海爾

+1

你有沒有將其粘貼到[lint.travis-ci.org(HTTP://皮棉。 travis-ci.org)? – cartant

回答

2

有一個在第13行格式化錯誤:before_script部。

script: 
    - npm run test:single 

到:在travis-ci validator

+0

驗證器得到同樣的錯誤。實際的錯誤存在於腳本屬性的空白處。當我刪除該空白時,它現在正常工作:) – user2371684

+0

很高興知道它得到了修復:) – gonephishing

0

刪除空格從驗證YAML文件

script: 
    - npm run test:single