Giter VIP home page Giter VIP logo

pytest-buildkite

Azure Status Travis Status Appveyor Status PyPI version Python Versions PyPI downloads per month Documentation Status Coverage Status Black

Plugin for pytest that automatically publishes coverage and pytest report annotations to BuildKite.

Note: This library was originally re-purposed from tonybaloney's pytest-azurepipelines

Just run pytest with this plugin and see your test results in the BuildKite UI!

Screenshot

More details can be found in the Online Documentation.

Installation

You can install pytest_buildkite for Python via pip from PyPI.

$ pip install pytest-buildkite

Prerequisites:

  • pipefish
  • plumbum

Download from PyPI.org

https://pypi.org/project/pytest-buildkite/

Features:

  • Overloads the --junit-xml flag on execution with a default value
  • Uploads test results automatically, no need for a separate test results upload command
  • Displays the number of failed tests if there were failures as an error message in the UI
  • Displays summary of code coverage if pytest-cov is installed

Running in Docker

To make the buildkite-agent available in docker make sure the agent is bind mounted into the docker image (or installed in the container) and the environment variables are passed down. A sample docker compose configuration is show below.

environment:
  - BUILDKITE
  - BUILDKITE_AGENT_ACCESS_TOKEN
  - BUILDKITE_ARTIFACT_UPLOAD_DESTINATION
  - BUILDKITE_BRANCH
  - BUILDKITE_BUILD_ID
  - BUILDKITE_BUILD_NUMBER
  - BUILDKITE_BUILD_URL
  - BUILDKITE_COMMIT
  - BUILDKITE_ENV_FILE
  - BUILDKITE_JOB_ID
  - BUILDKITE_LABEL
  - BUILDKITE_MESSAGE
  - BUILDKITE_ORGANIZATION_SLUG
  - BUILDKITE_REPO
  - BUILDKITE_S3_ACCESS_KEY_ID
 - BUILDKITE_S3_ACCESS_URL
  - BUILDKITE_S3_ACL
  - BUILDKITE_S3_DEFAULT_REGION
  - BUILDKITE_S3_SECRET_ACCESS_KEY
  - BUILDKITE_TAG
  - CI
volumes:
  - type: bind
    source: /usr/bin/buildkite-agent
    target: /usr/bin/buildkite-agent
  - type: bind
    source: /usr/bin/buildkite-agent-original
    target: /usr/bin/buildkite-agent-original

Contributing

Contributions are very welcome, consider using the file an issue to discuss the work before beginning, but if you already have a Pull Request ready then this is no problem, please submit it and it will be very gratefully considered. The Contribution Guidelines outlines the pytest-buildkite commitment to ensuring all contributions receive appropriate recognition.

License

Distributed under the terms of the MIT license, "pytest-buildkite" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Additional Documentation:

pytest-buildkite's Projects

pipefish icon pipefish

Process JUnit XML and Cobertura coverage XML reports into Markdown

pytest-buildkite icon pytest-buildkite

Plugin for pytest that automatically publishes coverage and pytest report annotations to Buildkite

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.