Nil
Nil

Reputation: 411

Migrating Coveralls Report from Travis-CI to GitHub Actions

I followed this setup guide: Integrating with coveralls.io This was perfect for Travis-CI, using coveralls and nyc. But recently when migrating to GitHub Actions, that step started failing with this error:

> [email protected] 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

What is the best way to make it work?

Upvotes: 1

Views: 405

Answers (1)

Nil
Nil

Reputation: 411

  • Edit the coverage script in package.json to use the default reporter of lcov
"coverage": nyc report --reporter=lcov
  • Modify the pipeline to use the official Coveralls stage
    - name: Test
      run: |
        npm run ci-test
        npm run coverage

    - name: Publish to coveralls.io
      uses: coverallsapp/[email protected]
      with:
        github-token: ${{ github.token }}

Originally posted on Ones and Zeros

Upvotes: 1

Related Questions