coveralls 2.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 54

Coveralls for Dart

Runtime Release License Coverage Build

Send LCOV and Clover coverage reports to the Coveralls service, in Dart.

Requirements

The latest Dart SDK and Pub versions. If you plan to play with the sources, you will also need the latest Grinder version.

Usage

Command line interface

The easy way. From a command prompt, install the coveralls executable:

$ pub global activate coveralls

Consider adding the pub global executables directory to your system path.

Then use it to upload your coverage reports:

$ coveralls --help

Send a coverage report to the Coveralls service.

Usage:
pub global run coveralls [options] <file>

Options:
-h, --help           output usage information
-v, --version        output the version number

For example:

$ coveralls build/lcov.info

Programming interface

The hard way. Add this to your package's pubspec.yaml file:

dependencies:
  coveralls: *

Then, from a command prompt, install the library:

$ pub get

Now in your Dart code, you can use the Client class to upload your coverage reports:

import 'dart:async';
import 'dart:io';
import 'package:coveralls/coveralls.dart';

Future main() async {
  try {
    var coverage = await new File('/path/to/coverage.report').readAsString();
    await new Client().upload(coverage);
    print('The report was sent successfully.');
  }
  
  on Exception catch (err) {
    print('An error occurred: $err');
  }
}

Supported coverage formats

Currently, this package supports two formats of coverage reports:

  • LCOV: the de facto standard.
  • Clover: a common format produced by Java and PHP test frameworks.

Supported CI services

This project has been tested with Travis CI service, but these services should also work with no extra effort:

Environment variables

If your build system is not supported, you can still use this package. There are a few environment variables that are necessary for supporting your build system:

  • COVERALLS_SERVICE_NAME : the name of your build system.
  • COVERALLS_REPO_TOKEN : the secret repository token from Coveralls.

There are optional environment variables:

  • COVERALLS_SERVICE_JOB_ID : a string that uniquely identifies the build job.
  • COVERALLS_RUN_AT : a date string for the time that the job ran. This defaults to your build system's date/time if you don't set it.

The full list of supported environment variables is available in the source code of the Configuration class (see the fromEnvironment() static method).

The .coveralls.yml file

This package supports the same configuration sources as the Coveralls ones:
Coveralls currently supports

See also

License

Coveralls for Dart is distributed under the MIT License.

Changelog

This file contains highlights of what changes on each version of the Coveralls for Dart package.

Version 2.1.0

  • Updated the package dependencies.

Version 2.0.1

  • Fixed a bug: the CLI script doesn't run when using the pub global run command.

Version 2.0.0

  • Breaking change: changed the signature of most class constructors.
  • Breaking change: most class properties are now final.
  • Breaking change: raised the required Dart version.
  • Breaking change: replaced the -f|--file named argument of the CLI script by an anonymous argument (e.g. coveralls lcov.info instead of coveralls -f lcov.info)
  • Breaking change: the version property is now private.
  • Added support for Clover reports.
  • Changed licensing for the MIT License.
  • Replaced the which module by where.
  • Updated the package dependencies.

Version 1.0.0

  • First stable release.

Version 0.3.0

  • Updated the package dependencies.

Version 0.2.0

  • Updated the package dependencies.

Version 0.1.1

  • Updated the documentation.

Version 0.1.0

  • Initial release.

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  coveralls: "^2.1.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:coveralls/coveralls.dart';
        
Version Uploaded Documentation Archive
2.1.0 Nov 3, 2017 Go to the documentation of coveralls 2.1.0 Download coveralls 2.1.0 archive
2.0.1 Sep 15, 2017 Go to the documentation of coveralls 2.0.1 Download coveralls 2.0.1 archive
2.0.0 Sep 15, 2017 Go to the documentation of coveralls 2.0.0 Download coveralls 2.0.0 archive
1.0.0 May 15, 2017 Go to the documentation of coveralls 1.0.0 Download coveralls 1.0.0 archive
0.3.0 Mar 25, 2017 Go to the documentation of coveralls 0.3.0 Download coveralls 0.3.0 archive
0.2.0 Feb 20, 2017 Go to the documentation of coveralls 0.2.0 Download coveralls 0.2.0 archive
0.1.1 Feb 17, 2017 Go to the documentation of coveralls 0.1.1 Download coveralls 0.1.1 archive
0.1.0 Feb 17, 2017 Go to the documentation of coveralls 0.1.0 Download coveralls 0.1.0 archive

Analysis

This feature is new.
We welcome feedback.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Dec 6, 2017
  • Dart: 2.0.0-dev.8.0
  • pana: 0.7.3+1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
11
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall score:
Weighted score of the above. [more]
54

Platforms

Detected platforms: Flutter, server

all of the above

Dependencies

Package Constraint Resolved Available
Direct dependencies
args >=0.13.7 <2.0.0 1.2.0
crypto ^2.0.2 2.0.2+1
http ^0.11.3 0.11.3+16
lcov ^3.0.0 3.1.0
path ^1.4.2 1.5.1
where ^2.1.1 2.2.0 3.0.0
xml ^2.6.0 2.6.0
yaml ^2.1.12 2.1.13
Transitive dependencies
async 2.0.1
charcode 1.1.1
collection 1.14.3
convert 2.0.1
http_parser 3.1.1
matcher 0.12.1+4
meta 1.1.2
petitparser 1.6.1
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
Dev dependencies
coverage ^0.9.3
grinder ^0.8.0
test ^0.12.27