npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sfdc-travisci-coveralls

v0.2.5

Published

Runs a Salesforce project's Apex tests in TravisCI then reports overall coverage results to Coveralls

Downloads

12

Readme

sfdc-travisci-coveralls

npm version npm

Runs a Salesforce project's Apex tests via TravisCI and reports overall coverage results to Coveralls.

Access to your project's repo will need to be enabled in both Travis and Coveralls. When commits are pushed, the build will run automatically.

Note that these services only support projects hosted on Github. Private repos will require paid accounts at both.

Prerequisites

Setup

A working project that may be used as a template: sample-apex-library.

File structure

Expected file structure is standard; src folder in root directory and a valid package.xml file under it referencing the package's metadata.

A .travis.yml file will also be needed.

TravisCI

Create a .travis.yml file at the root of your project. Here's an example from sample-apex-library:

language: node_js
node_js:
  - node
git:
  depth: 1
install:
  - npm install -g sfdc-travisci-coveralls
script:
  - sfdc-travisci-coveralls

The build will also need an org to be run against. A solid option for this is to sign up a free developer org, a separate one for each project.

In the TravisCI configuration for the project, you'll need to add some environment variables:

  • SFDC_LOGINURL - eg. https://login.salesforce.com
  • SFDC_USERNAME - username
  • SFDC_PASSWORD - password
  • SFDC_TOKEN - security token
  • COVERALLS_REPO_TOKEN - found on the project's Coveralls page

Commit/push

Commit the .travis.yml file and push.

Travis will immediately start running the build. If either the deployment or tests fail, the build will exit with a failing status.

Steps taken:

  1. Deploys the package
  2. Runs tests found in the package on the org
  3. Retrieves and parses Apex coverage results
  4. Posts coverage to Coveralls.io