Skip to content

coverallsapp/orb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coveralls CircleCI Orb CircleCI CircleCI Orb Version

How to enable

Note ⚠️: To use CircleCI Orbs in your projects, you need to enable two settings:

  • from organization settings allow using uncertified orbs Settings -> Security -> Allow uncertified orbs
  • from the project's settings allow beta features Settings -> Advanced Settings -> Enable pipelines

See the official CircleCI documentation.

Commands

  • coveralls/upload

See the parameter documentation here: https://circleci.com/orbs/registry/orb/coveralls/coveralls#commands

Supported coverage formats

See coverage-reporter

Examples

Each example below should be placed into circle.yml or .circleci/config.yml file.

Also see our demo project with the setup.

Simple

Build and upload to Coveralls in a single job. Demo: https://github.com/coverallsapp/coveralls-node-demo

version: 2.1

orbs:
  coveralls: coveralls/[email protected]

jobs:
  build:
    docker:
      - image: circleci/node:10.0.0

    steps:
      - checkout

      - run:
          name: Install and Make
          command: 'npm install && make test-coverage'

      - coveralls/upload

Parallel

Coveralls parallel build. 'build' jobs uploads coverage, then 'done' job hits parallel complete webhook to finish the build. Demo: https://github.com/coverallsapp/coveralls-node-demo

version: 2.1

orbs:
  coveralls: coveralls/[email protected]

jobs:
  build-1:
    docker:
      - image: circleci/node:10.0.0

    steps:
      - checkout

      - run:
          name: Install and Make 1
          command: 'npm install && make test-coverage-1'

      - coveralls/upload:
          parallel: true
          flag_name: Test 1

  build-2:
    docker:
      - image: circleci/node:10.0.0

    steps:
      - checkout

      - run:
          name: Install and Make 2
          command: 'npm install && make test-coverage-2'

      - coveralls/upload:
          parallel: true
          flag_name: Test 2

  done:
    docker:
      - image: circleci/node:10.0.0

    steps:
      - coveralls/upload:
          parallel_finished: true

workflows:
  test_parallel_then_upload:
    jobs:
      - build-1
      - build-2
      - done:
          requires: [build-1, build-2]

Dev Notes

  • Validate:
circleci orb pack ./src > orb.yml

circleci orb validate orb.yml
  • Publish:

Auto-publish with pushing a git tag:

git tag vX.Y.Z
git push origin vX.Y.Z

Our Open-Source Promise

Coveralls.io is always free for open-source projects!

Create a free account for your (public) repo at Coveralls, then use one of our official integrationscoverage-reporter, github-action, or orb (this project!)—to upload your coverage reports to the Coveralls API.

Additionally, over 30 community-created language integrations exist for Coveralls.io, which you can find here.

Getting help

Get started with our documentation here.

Issues or Questions? Reach out to us here, or at [email protected].

Contributing

Bug reports and pull requests are welcome.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Contributors are expected to adhere to the Contributor Covenant code of conduct.