class
ActiveSupport::ContinuousIntegration
v8.1.1 -
Show latest stable
- Superclass: Object
Provides a DSL for declaring a continuous integration workflow that can be run either locally or in the cloud. Each step is timed, reports success/error, and is aggregated into a collective report that reports total runtime, as well as whether the entire run was successful or not.
Example:
ActiveSupport::ContinuousIntegration.run do step "Setup", "bin/setup --skip-server" step "Style: Ruby", "bin/rubocop" step "Security: Gem audit", "bin/bundler-audit" step "Tests: Rails", "bin/rails test test:system" if success? step "Signoff: Ready for merge and deploy", "gh signoff" else failure "Skipping signoff; CI failed.", "Fix the issues and try again." end end
Starting with Rails 8.1, a default `bin/ci` and `config/ci.rb` file are created to provide out-of-the-box CI.
Constants
COLORS = {\nbanner: "\\033[1;32m", # Green\ntitle: "\\033[1;35m", # Purple\nsubtitle: "\\033[1;90m", # Medium Gray\nerror: "\\033[1;31m", # Red\nsuccess: "\\033[1;32m" # Green\n}
Attributes
| [R] | results |
Files
- activesupport/lib/active_support/continuous_integration.rb