travis-ci - 将工作服报告从 Travis-CI 迁移到 GitHub Actions
问题描述
我遵循了这个设置指南:与 Coveralls.io 集成 这对于 Travis-CI 来说是完美的,使用工作服和 nyc。但是最近在迁移到 GitHub Actions 时,该步骤开始失败并出现以下错误:
> js-big-decimal@1.3.3 coverage /home/runner/work/js-big-decimal/js-big-decimal
> nyc report --reporter=text-lcov | coveralls
/home/runner/work/js-big-decimal/js-big-decimal/node_modules/coveralls/bin/coveralls.js:19
throw err;
^
Bad response: 422 {"message":"Couldn't find a repository matching this job.","error":true}
(Use `node --trace-uncaught ...` to show where the exception was thrown)
npm ERR! code ELIFECYCLE
让它发挥作用的最佳方法是什么?
解决方案
- 编辑 package.json 中的覆盖脚本以使用 lcov 的默认报告器
"coverage": nyc report --reporter=lcov
- 修改管道以使用官方 Coveralls 阶段
- name: Test
run: |
npm run ci-test
npm run coverage
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ github.token }}
最初发表于 1和 0
推荐阅读
- r - R parLapply:如何(或我们可以)访问并行代码中的对象
- c# - 为什么 CharacterController 运动时 CharacterController.velocity 的 x 和 z 值始终为 0?
- python - 删除现有文件返回 FileNotFoundError
- javascript - 当我将 removeEventListener 放在另一个条件语句中时它不起作用
- java - Java 根据项目的属性汇总项目列表
- android - 多行阿拉伯语文本的 StaticLayout 高度不准确
- html - 如何从电子邮件地址获取输入?
- kubernetes - traefik 入口通配符支持
- javascript - 如何从javascript返回服务器端onclick
- macos - 使用 osascript 脚本打开终端并运行 npm 命令