Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 23, 2022 03:36 pm GMT

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 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: falselanguage: node_jsnode_js:  - "node"env:  global:    - COVERALLS_PARALLEL=truejobs:  include:    - script: COVERALLS_FLAG_NAME=test-1 make test-coveralls-1    - script: COVERALLS_FLAG_NAME=test-2 make test-coveralls-2notifications:  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


Original Link: https://dev.to/montana/paralleling-coverage-using-coveralls-and-travis-1e56

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To