微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

将工作服报告从 Travis-CI 迁移到 GitHub Actions

如何解决将工作服报告从 Travis-CI 迁移到 GitHub Actions

我遵循了此设置指南:Integrating with coveralls.io 这对于 Travis-CI 来说是完美的,使用工作服和纽约。但是最近在迁移到 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
  • 修改管道以使用官方工作服阶段
    - 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 }}

最初发布于 Ones and Zeros

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。