Paralleling Code Coverage using Coveralls and Travis

Hey developer friends,

A short one today — but an important one.

Let’s say you have multiple environments you want to have coverage, first let’s enable Coveralls for your repo, so if you haven’t done so yet — head over to coveralls.io and Auth th…


This content originally appeared on DEV Community and was authored by DEV Community

Hey developer friends,

A short one today -- but an important one.

Let's say you have multiple environments you want to have coverage, first let's enable Coveralls for your repo, so if you haven't done so yet -- head over to coveralls.io and Auth the Coveralls app to up your GitHub account, and then sync your repos with Coveralls.

You'll want to have a .travis.yml file that looks similar to mine:

sudo: false
language: node_js
node_js:
  - "node"
env:
  global:
    - COVERALLS_PARALLEL=true
jobs:
  include:
    - script: COVERALLS_FLAG_NAME=test-1 make test-coveralls-1
    - script: COVERALLS_FLAG_NAME=test-2 make test-coveralls-2
notifications:
  webhooks: https://coveralls.io/webhook

You'll see we are running multiple COVERALLS_FLAG_NAME, this is using the Coveralls webhook to parallelize your coverage. If at first you don't see Coveralls covering your code, you may want to add your env var from Coveralls to Travis CI and name it something like COVERALLS_TOKEN.

Image description

Here's my repo so you can follow step by step! https://github.com/Montana/coveralls-node-travis


This content originally appeared on DEV Community and was authored by DEV Community


Print Share Comment Cite Upload Translate Updates
APA

DEV Community | Sciencx (2022-02-23T15:36:25+00:00) Paralleling Code Coverage using Coveralls and Travis. Retrieved from https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/

MLA
" » Paralleling Code Coverage using Coveralls and Travis." DEV Community | Sciencx - Wednesday February 23, 2022, https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/
HARVARD
DEV Community | Sciencx Wednesday February 23, 2022 » Paralleling Code Coverage using Coveralls and Travis., viewed ,<https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/>
VANCOUVER
DEV Community | Sciencx - » Paralleling Code Coverage using Coveralls and Travis. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/
CHICAGO
" » Paralleling Code Coverage using Coveralls and Travis." DEV Community | Sciencx - Accessed . https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/
IEEE
" » Paralleling Code Coverage using Coveralls and Travis." DEV Community | Sciencx [Online]. Available: https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/. [Accessed: ]
rf:citation
» Paralleling Code Coverage using Coveralls and Travis | DEV Community | Sciencx | https://www.scien.cx/2022/02/23/paralleling-code-coverage-using-coveralls-and-travis/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.