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
+6 -4
View File
@@ -2,10 +2,12 @@ name: CI Pipeline
run-name: "${{ gitea.actor }} triggered CI pipeline" run-name: "${{ gitea.actor }} triggered CI pipeline"
on: on:
workflow_dispatch: {} workflow_dispatch: {} # Manual trigger only - run tests locally before merging
pull_request: # Auto-runs disabled for solo development
branches: [main] # Re-enable when ready for collaborators:
types: [opened, reopened, synchronize] # pull_request:
# branches: [main]
# types: [opened, reopened, synchronize]
env: env:
NODE_VERSION: "20" NODE_VERSION: "20"
-12
View File
@@ -1,12 +0,0 @@
{
"WARNING": "This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.",
"id": 18,
"uuid": "a35806c0-29be-4c15-b5d9-cc265ac762ba",
"name": "community-rule-runner-mac",
"token": "b40fd7ddc8b53bc652640beb0a6837aba10ef967",
"address": "https://git.medlab.host",
"labels": [
"self-hosted:host",
"macos-latest:host"
]
}
-25
View File
@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.gitea.act-runner</string>
<key>ProgramArguments</key>
<array>
<string>/Users/Vinod/Documents/GitHub/community-rule/act_runner</string>
<string>daemon</string>
<string>--config</string>
<string>/Users/Vinod/Documents/GitHub/community-rule/config/gitea-runner.yaml</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/Vinod/Documents/GitHub/community-rule</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/Vinod/Documents/GitHub/community-rule/runner.log</string>
<key>StandardErrorPath</key>
<string>/Users/Vinod/Documents/GitHub/community-rule/runner-error.log</string>
</dict>
</plist>
-33
View File
@@ -1,33 +0,0 @@
log:
level: debug
runner:
file: .runner
capacity: 2
timeout: 3h
insecure: false
fetch_timeout: 5s
fetch_interval: 2s
labels:
- "self-hosted"
- "macos-latest"
cache:
enabled: true
dir: ""
host: ""
port: 0
external_server: ""
# container:
# network: ""
# privileged: false
# options:
# workdir_parent:
# valid_volumes: []
# docker_host: ""
# force_pull: false
# mode: "host"
host:
workdir_parent: ""
-10
View File
@@ -1,10 +0,0 @@
log:
level: info
runner:
capacity: 2
runners:
- name: community-rule-runner
labels:
- "ubuntu-latest:docker://mcr.microsoft.com/playwright:v1.54.2-jammy"
-4
View File
@@ -1,4 +0,0 @@
time="2026-01-29T20:16:26-07:00" level=info msg="log level changed to debug" func="[initLogging]" file="[daemon.go:158]"
time="2026-01-29T20:16:26-07:00" level=info msg="Starting runner daemon" func="[func6]" file="[daemon.go:38]"
time="2026-01-29T20:16:26-07:00" level=debug msg="gc: 2026-01-29 20:16:26.704803 -0700 MST m=+0.007200001" func="[gcCache]" file="[handler.go:439]" module=artifactcache
time="2026-01-29T20:16:26-07:00" level=info msg="runner: community-rule-runner-mac, with version: v0.2.6, with labels: [self-hosted macos-latest], declare successfully" func="[func6]" file="[daemon.go:109]"
-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."