mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
851 B
28 lines
851 B
#!/bin/sh
|
|
# Pre-push hook: runs the FULL CI suite via Docker before pushing to GitHub.
|
|
# Mirrors GitHub Actions exactly: Rubocop, ERBLint, ESLint, Brakeman, RSpec.
|
|
# Skip with: git push --no-verify
|
|
#
|
|
# Enable this hook: git config core.hooksPath .githooks
|
|
set -e
|
|
|
|
echo "🔍 Running full CI suite before push..."
|
|
|
|
docker compose -f docker-compose.ci.yml build --quiet 2>/dev/null
|
|
|
|
echo "━━━ Lint (Rubocop + ERBLint + ESLint) ━━━"
|
|
docker compose -f docker-compose.ci.yml run --rm --no-deps lint
|
|
|
|
echo ""
|
|
echo "━━━ Brakeman (Security) ━━━"
|
|
docker compose -f docker-compose.ci.yml run --rm --no-deps brakeman
|
|
|
|
echo ""
|
|
echo "━━━ RSpec ━━━"
|
|
docker compose -f docker-compose.ci.yml run --rm rspec
|
|
|
|
docker compose -f docker-compose.ci.yml down --volumes 2>/dev/null
|
|
|
|
echo ""
|
|
echo "✅ Full CI suite passed. Push allowed."
|