CI/CD integration

August 10, 2026 · View on GitHub

The console formatters are designed to work well in CI/CD pipelines. The ci formatter is specifically built for CI output with colored status tags and a compact summary.

Choosing a formatter for CI

FormatterCI suitability
ciBest for CI — compact, colored status tags, end-of-run failure summary.
logGood for CI — timestamped lines, no live updates.
minimalGood for CI — plain text, no colors, minimal noise.
modern-consoleWorks in CI but designed for interactive terminals.
modern-console-liveNot recommended for CI — uses Rich Live which may not render correctly.
progressNot recommended for CI — uses in-place line updates.

GitHub Actions

name: Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install -e ".[dev]"
      - run: behave --format=ci -D mcr.colors=false

Disabling colors in CI

behave --format=ci -D mcr.colors=false

Hiding step details for compact output

behave --format=ci -D mcr.show_steps=false

Hiding the progress bar

behave --format=ci -D mcr.ci.show_progress=false

GitLab CI

test:
  image: python:3.12
  script:
    - pip install -e ".[dev]"
    - behave --format=ci -D mcr.colors=false

Azure DevOps

steps:
  - script: |
      pip install -e ".[dev]"
      behave --format=ci -D mcr.colors=false
    displayName: Run Behave tests

Jenkins

pip install -e ".[dev]"
behave --format=ci -D mcr.colors=false

Combining with the Markdown report

You can show console output and generate a Markdown report at the same time:

behave -f ci -o /dev/null -f behave_modern_md_report.formatter:BehaveMarkdownFormatter -o report.md