【问题标题】:travis cannot parse my configuration filetravis 无法解析我的配置文件
【发布时间】:2015-03-10 23:43:41
【问题描述】:

让 travis 运行我的测试时遇到问题。它在解析我的 .travis.yml 文件期间停止。 您可以在此处查看存储库:https://github.com/steve-korzinetzki/costcontrol

文件内容如下:

language: php
php:
  - 5.5
  - hhvm

services: mysql

before_script:
  # installation
  - composer self-update
  - composer install --dev --prefer-source --no-interaction
  # database configuration
  - mysql -e 'create database cc_testing;'
  # startup server environment
  - php artisan migrate:install
  - php artisan migrate
  - php artisan migrate:install --env=”testing”
  - php artisan serve
  - sleep 5

script:
  - phpunit
  - vendor/bin/behat

错误信息是:

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 error was "'reader' unacceptable character '' (0x80) special characters are not allowed

in "'reader'", position 373 at line 0 column 0".

我认为文件的字符集有错误。但我不明白。一个有趣的事实:travis 验证页面显示该文件很好(请参阅http://lint.travis-ci.org/steve-korzinetzki/costcontrol)。

有没有人遇到过类似的问题?有谁知道解决方案?感谢您的帮助。

【问题讨论】:

    标签: php utf-8 character-encoding travis-ci


    【解决方案1】:

    我设法让这个脚本运行。错误不在第一行。这是错误的“后来

    【讨论】:

      【解决方案2】:

      我的连字符类型错误,无法看到,linter 再次表示 yaml 有效,但构建无法运行。

      要追踪流氓字符,请将 .yml 视为单行并计算 在“'reader'”中给出的字符数,位置 XXX

      【讨论】:

        猜你喜欢
        • 2020-10-29
        • 2019-03-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-03-01
        • 2019-05-10
        • 2019-03-05
        • 2021-12-05
        相关资源
        最近更新 更多