practice doing this
at main 852 B view raw
1# Run using bin/ci 2 3CI.run do 4 step "Setup", "bin/setup --skip-server" 5 6 step "Style: Ruby", "bin/rubocop" 7 8 step "Security: Gem audit", "bin/bundler-audit" 9 step "Security: Importmap vulnerability audit", "bin/importmap audit" 10 step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error" 11 12 step "Tests: Rails", "bin/rails test" 13 step "Tests: System", "bin/rails test:system" 14 step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant" 15 16 # Optional: set a green GitHub commit status to unblock PR merge. 17 # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`. 18 # if success? 19 # step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff" 20 # else 21 # failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again." 22 # end 23end