hackatime/config/ci.rb
Mahad Kalam 8ce245d8c4
make leaderboards go vrooom (#1120)
* make leaderboards go vrooom

* goog
2026-03-30 13:58:18 +01:00

25 lines
1.1 KiB
Ruby

CI.run do
step "Setup: Rails", "bin/setup --skip-server"
step "Style: Ruby", "bin/rubocop"
step "Zeitwerk", "bin/rails zeitwerk:check"
step "Security: Importmap vulnerability audit", "bin/importmap audit"
step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error"
step "Setup: Test DB", "env RAILS_ENV=test bin/rails db:create db:schema:load"
step "Setup: Vite assets", "env RAILS_ENV=test bin/vite build"
step "Tests: Rails", "env RAILS_ENV=test bin/rails test"
step "Tests: System", "env RAILS_ENV=test bin/rails test:system"
step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"
step "Docs: Swagger", "env RAILS_ENV=test bin/rails rswag:specs:swaggerize && git diff --exit-code swagger/v1/swagger.yaml"
step "Frontend: Typecheck", "bun run check:svelte"
step "Frontend: Lint", "bun run format:svelte:check"
if success?
heading "Signoff: All systems go. Ready for merge and deploy.", type: :success
else
failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
end
end