gpt4 book ai didi

javascript - Gulp-Coveralls 返回 422,找不到 TravisCI 构建

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:46:14 24 4
gpt4 key购买 nike

TravisCI 构建通过了我的开源项目,我现在正在尝试集成 gulp-coveralls。在 Coveralls.io 上,找不到我的存储库的任何构建,即使自从我将我的存储库添加到 Coveralls 后 Travis 构建已成功运行。

'There have been no builds for this repo.'

当我尝试运行我的 gulp-coveralls gulp 任务时,出现此错误:

'Repo token could not be determined.  Continuing without it.'
Error in plugin 'gulp-coveralls'
Bad response:422 {"message":"Couldn't find a repository matching this job.","error":true}
at handleError (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/index.js:11:30)
at sendToCoverallsCallback (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/index.js:19:9)
at /Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/index.js:31:13
at Request._callback (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/node_modules/coveralls/lib/sendToCoveralls.js:7:5)
at Request.self.callback (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/node_modules/coveralls/node_modules/request/index.js:142:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/node_modules/coveralls/node_modules/request/index.js:856:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/Users/sarah.green/angular-embedly/node_modules/gulp-coveralls/node_modules/coveralls/node_modules/request/index.js:808:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)

这是我到目前为止所得到的:

package.json 中我的开发依赖项中的 gulp-coveralls

gulpfile.js:

var coveralls = require('gulp-coveralls');
...
gulp.task('coveralls', function () {
gulp.src('coverage/**/lcov.info')
.pipe(coveralls());
});

业力.conf.js:

coverageReporter: {
type : 'lcov',
dir : 'coverage/'
}

Github:https://github.com/lithiumtech/angular-embedly

我使用 Karma 和 PhantomJS 来运行我的测试。肯定会生成文件 coverage/lcov.info。知道会发生什么吗?

最佳答案

莎拉,

您缺少的是工作服存储库 token 。您必须前往 coveralls.io 并使用您的 GitHub 帐户创建登录。然后,这会将您所有的 repo 协议(protocol)放入工作服中。然后对于要使用工作服的存储库,单击“关闭”开关打开工作服。

现在点击“view on coveralls”按钮,它会显示你的repo key。然后,您可以通过创建一个 .coveralls.yml 文件并将您的 key 复制到该文件中来进行设置。这应该可以解决您的问题。

关于javascript - Gulp-Coveralls 返回 422,找不到 TravisCI 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25434794/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com