8f39c015ea
This is the first step of a multi-step SaaS engine extraction. Looking ahead to an open source release, we need to make sure that local authentication is treated as an "official" option, and not just a hack I added for Kevin to do load testing outside our DC. So this PR gets to green, and adds a CI step in "local authentication" mode. This all probably feels a little hacky to you, Reader, but the goal of this change is to ease the next step, which will be extracting the 37id and Queenbee integrations into a proprietary "SaaS mode" engine. In service of that goal, this commit simply wraps all of the dependent code and tests with a conditional check on `config.x.local_authentication`.
23 lines
811 B
Ruby
23 lines
811 B
Ruby
# Run using bin/ci
|
|
|
|
CI.run do
|
|
step "Setup", "bin/setup --skip-server"
|
|
|
|
step "Style: Ruby", "bin/rubocop"
|
|
|
|
step "Security: Gem audit", "bin/bundler-audit check --update"
|
|
step "Security: Importmap audit", "bin/importmap audit"
|
|
step "Security: Brakeman audit", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error"
|
|
|
|
step "Tests: Rails with 37id auth", "bin/rails test"
|
|
step "Tests: Rails with local auth", "LOCAL_AUTHENTICATION=1 bin/rails test"
|
|
step "Tests: 37id", "bin/rails 37id:test:units"
|
|
step "Tests: System", "bin/rails test:system"
|
|
|
|
if success?
|
|
step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff"
|
|
else
|
|
failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
|
|
end
|
|
end
|