Giter VIP home page Giter VIP logo

rspec-buildkite's Introduction

RSpec Buildkite

Output RSpec failure messages as Buildkite annotations as soon as they happen so you can fix them while your build finishes.

A Buildkite build still in progress with an annotation showing an RSpec failure

Installation

Add the gem to your Gemfile, after rspec:

gem "rspec"
gem "rspec-buildkite"

And then bundle:

$ bundle

Or install it yourself as:

$ gem install rspec-buildkite

Usage

Add it to your .rspec alongside your favorite formatter:

--color
--require spec_helper
--format documentation
--format RSpec::Buildkite::AnnotationFormatter

Now run your specs on Buildkite!

Docker & Docker Compose

If you run your RSpec builds inside Docker or Docker Compose then you'll need to make sure that buildkite-agent is available inside your container, and that some environment variables are propagated into the running containers. The buildkite-agent binary can be baked into your image, or mounted in as a volume. If you're using the docker-compose-buildkite-plugin you can pass the environment using plugin configuration. Or you can add them to the environment section in your docker-compose.yml, or supply env arguments to your docker command.

The following environment variables are required:

  • BUILDKITE
  • BUILDKITE_BUILD_URL
  • BUILDKITE_JOB_ID
  • BUILDKITE_AGENT_ACCESS_TOKEN

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite/rspec-buildkite.

License

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

rspec-buildkite's People

Contributors

dependabot[bot] avatar juanitofatas avatar shkolnik avatar sj26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rspec-buildkite's Issues

Fails silently if buildkite-agent isn't available

Running with docker-compose, I'd forgotten to mount the buildkite-agent binary into the container. The system call returns false for the non-zero exit status, but it doesn't raise an exception so no message is displayed in the logs.

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.