Remove CI runner for now

This commit is contained in:
adilallo
2026-01-29 20:32:31 -07:00
parent 16166f5cc5
commit ca42982dea
12 changed files with 39 additions and 273 deletions
-42
View File
@@ -1,42 +0,0 @@
#!/bin/bash
# Script to register Gitea runner
# Usage: ./scripts/register-runner.sh <registration_token>
if [ -z "$1" ]; then
echo "❌ Error: Registration token required"
echo ""
echo "To get a registration token:"
echo "1. Go to: https://git.medlab.host/CommunityRule/community-rule/settings/actions/runners"
echo "2. Click 'New Runner' or find the registration token"
echo "3. Run: ./scripts/register-runner.sh YOUR_TOKEN"
exit 1
fi
TOKEN=$1
INSTANCE="https://git.medlab.host"
NAME="community-rule-runner-mac"
LABELS="self-hosted,macos-latest"
echo "🚀 Registering runner..."
echo "Instance: $INSTANCE"
echo "Name: $NAME"
echo "Labels: $LABELS"
echo ""
./act_runner register \
--instance "$INSTANCE" \
--token "$TOKEN" \
--name "$NAME" \
--labels "$LABELS" \
--no-interactive
if [ $? -eq 0 ]; then
echo ""
echo "✅ Runner registered successfully!"
echo "You can now start it with: ./scripts/start-runner.sh"
else
echo ""
echo "❌ Registration failed. Please check the token and try again."
exit 1
fi
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
echo "🚀 Starting Gitea Actions Runner..."
# Ensure Node.js is available in PATH
export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH"
# Verify Node.js is accessible
if ! command -v node >/dev/null 2>&1; then
echo "❌ Node.js not found in PATH!"
echo "Current PATH: $PATH"
exit 1
fi
echo "✅ Node.js found: $(which node) - $(node -v)"
# Check if runner is already running
if pgrep -f "act_runner daemon" > /dev/null; then
echo "⚠️ Runner is already running!"
echo "To stop it, run: ./scripts/stop-runner.sh"
exit 1
fi
# Start the runner in the background with proper PATH and log redirection
PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH" ./act_runner daemon --config config/gitea-runner.yaml > runner.log 2>&1 &
RUNNER_PID=$!
# Save PID to file for easy stopping
echo $RUNNER_PID > .runner.pid
echo "✅ Runner started with PID: $RUNNER_PID"
echo "📝 Logs will be written to: runner.log"
echo ""
echo "To stop the runner, run: ./scripts/stop-runner.sh"
echo "To check status, run: ./scripts/status-runner.sh"
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
echo "📊 Gitea Actions Runner Status"
echo "=============================="
# Check if runner is running
if pgrep -f "act_runner daemon" > /dev/null; then
RUNNER_PID=$(pgrep -f "act_runner daemon")
echo "✅ Runner is RUNNING (PID: $RUNNER_PID)"
echo ""
echo "📝 Recent logs:"
if [ -f runner.log ]; then
tail -5 runner.log
else
echo "No log file found"
fi
echo ""
echo "To stop the runner: ./scripts/stop-runner.sh"
else
echo "❌ Runner is NOT RUNNING"
echo ""
echo "To start the runner: ./scripts/start-runner.sh"
fi
echo ""
echo "🔗 Gitea Actions URL:"
echo "https://git.medlab.host/CommunityRule/community-rule/actions"
-34
View File
@@ -1,34 +0,0 @@
#!/bin/bash
echo "🛑 Stopping Gitea Actions Runner..."
# Check if PID file exists
if [ -f .runner.pid ]; then
RUNNER_PID=$(cat .runner.pid)
# Check if process is still running
if ps -p $RUNNER_PID > /dev/null; then
echo "🔄 Stopping runner with PID: $RUNNER_PID"
kill $RUNNER_PID
# Wait a moment for graceful shutdown
sleep 2
# Force kill if still running
if ps -p $RUNNER_PID > /dev/null; then
echo "⚡ Force stopping runner..."
kill -9 $RUNNER_PID
fi
echo "✅ Runner stopped successfully"
else
echo "⚠️ Runner process not found (PID: $RUNNER_PID)"
fi
# Clean up PID file
rm -f .runner.pid
else
echo "🔍 No PID file found, checking for any running runners..."
pkill -f "act_runner daemon"
echo "✅ Any running runners have been stopped"
fi
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# Local testing script - run before committing/merging
# Usage: ./scripts/test-local.sh
echo "🧪 Running local tests before commit..."
echo ""
echo "🔍 Linting..."
npm run lint || exit 1
echo ""
echo "💅 Prettier check..."
npm exec prettier -- --check "**/*.{js,jsx,ts,tsx,json,css,md}" || exit 1
echo ""
echo "📦 Component tests with coverage..."
npm test || exit 1
echo ""
echo "🎭 E2E tests..."
npm run test:e2e || exit 1
echo ""
echo "🖼️ Visual regression tests..."
npm run visual:test || exit 1
echo ""
echo "⚡ Performance tests (Lighthouse CI)..."
npm run performance:budget || exit 1
echo ""
echo "✅ All tests passed! Safe to commit/merge."
-47
View File
@@ -1,47 +0,0 @@
#!/bin/bash
echo "🔍 Verifying Gitea Runner Status"
echo "================================="
echo ""
# Check if runner is registered
if [ ! -f .runner ]; then
echo "❌ Runner not registered - .runner file not found"
echo " Run: ./scripts/register-runner.sh <token>"
exit 1
fi
echo "✅ Runner registration file exists"
RUNNER_ID=$(cat .runner | grep -o '"id": [0-9]*' | cut -d' ' -f2)
echo " Runner ID: $RUNNER_ID"
echo ""
# Check if runner is running
if pgrep -f "act_runner daemon" > /dev/null; then
RUNNER_PID=$(pgrep -f "act_runner daemon")
echo "✅ Runner process is running (PID: $RUNNER_PID)"
else
echo "⚠️ Runner process is NOT running"
echo " Start it with: ./scripts/start-runner.sh"
exit 1
fi
echo ""
echo "📝 Recent logs (checking for polling activity):"
if [ -f runner.log ]; then
echo "---"
tail -20 runner.log | grep -E "(polling|fetch|task|job|online|error|Error)" || tail -10 runner.log
echo "---"
echo ""
echo "Look for messages like:"
echo " - 'fetching task' or 'polling' (good - runner is active)"
echo " - 'error' or 'Error' (bad - check the full log)"
else
echo "⚠️ No log file found"
fi
echo ""
echo "🔗 Check runner status in Gitea:"
echo " https://git.medlab.host/CommunityRule/community-rule/settings/actions/runners"
echo ""
echo "The runner should show as 'Idle' (online) if it's working correctly."