An Interest In:
Web News this Week
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
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
.
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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To