Giter Club home page Giter Club logo

cargo-service-message's Introduction

cargo-service-message

Provides (test) service messages for Cargo for integration into CI systems like TeamCity.

(See also https://github.com/JetBrains/teamcity-rust-plugin if you are allowed to add plugins to your TeamCity instance)

How to install it?

Install the standard way:

cargo install cargo-service-message

If you want coverage also install grcov:

cargo install grcov

How to use it?

If you're using Teamcity or Teamcity Cloud then if you type:

cargo service-message test rather than cargo test then it will emit service messages that TeamCity (and others?) understand and use to update their UI on the fly.

If you have a command line that doesn't work then please raise an issue.

What's supported out of the box:

These are example commands that seem to work so far:

  • cargo service-message test (test results appear in the TeamCity UI as they happen)
  • cargo service-message bench (stats logged so TeamCity can graph them)
  • cargo service-message clippy (violations appear as inspections)
  • cargo service-message build (warnings appear as inspections)
  • cargo service-message check
  • cargo service-message rustc
  • cargo service-message clean (no-op passthrough)
  • cargo service-message fmt (no-op passthrough)

For compiles it will add in cargo-timings.html to the artifacts. I can't configure the report tab to display it for you - you can do that from the root project for all projects in the instance and if the report is there it will add the tab.

set env SERVICE_MESSAGE="--cover" for coverage to be generated.

If you do not wish for the coverage report to be generated after that invocation (because you have some more tests to run that will influence the coverage) then use: "--cover-without-report".

set env SERVICE_MESSAGE="--debug" for debug messages.

Todo list:

[ ] Style coverage results so they don't look dreadful.

[ ] Write some more tests now coverage is automatic.

[ ] If the subcommand causes problems, we could read from stdin E.g. cargo test --message-format=json | cargo-service-message

[ ] Support just/cargo-make?

Teamcity Todo list:

Hi Jetbrains, here are the things that would make Teamcity + Rust even more awesome:

[ ] Use monospaced font in inspections.

[ ] Interpret ansi escape codes in inspections as happens in the teamcity build log.

Help Wanted:

[ ] TeamCity playtesters required - try it on your teamcity instance and give us feedback!

[ ] Hackers required - help make the crate do the right thing in as many circumstances as possible.

Licence:

Licenced as Apache 2.0 or MIT at your choice.

Tracking Issues:

rust-lang/rust#77890

rust-lang/rust#49359

rust-lang/rust#50297

Release log:

0.1.8 Report ignored tests.

0.1.7 (Unreleased): Have coverage work with proc-macros.

0.1.6 (Unreleased): Honor CARGO_TARGET_DIR

0.1.5 Ignore 3rd party crates in coverage.

0.1.4 Initial crates release

cargo-service-message's People

Contributors

gilescope avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tljubej-tbtl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.