From 8e0b4246b2e8a6ceda8b5b144fc47193cf85b9e5 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:10:40 -0600 Subject: [PATCH] Test runner --- .gitea/workflows/ci.yaml | 19 ++++++++++--------- .runner.pid | 1 + start-runner.sh | 16 ++++++++++++++-- 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .runner.pid diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e27d05c..34f1528 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -11,15 +11,16 @@ on: jobs: canary: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - run: | + echo "PATH=$PATH" + which node && node -v uname -a - node -v || true echo "Runner labels OK ✅" test: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] strategy: matrix: { node-version: [18, 20] } env: @@ -48,7 +49,7 @@ jobs: # bash codecov.sh -t "${{ secrets.CODECOV_TOKEN }}" -f coverage/lcov.info -F unittests e2e: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] strategy: matrix: { browser: [chromium, firefox, webkit] } steps: @@ -81,7 +82,7 @@ jobs: retention-days: 30 visual-regression: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -118,7 +119,7 @@ jobs: retention-days: 30 performance: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -156,7 +157,7 @@ jobs: path: lhci-results storybook: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -167,7 +168,7 @@ jobs: env: { CI: true } lint: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -177,7 +178,7 @@ jobs: - run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" build: - runs-on: ["self-hosted:host", "macos-latest:host"] + runs-on: [self-hosted, macos-latest] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.runner.pid b/.runner.pid new file mode 100644 index 0000000..9e1612c --- /dev/null +++ b/.runner.pid @@ -0,0 +1 @@ +66560 diff --git a/start-runner.sh b/start-runner.sh index e669821..7a7bb3f 100755 --- a/start-runner.sh +++ b/start-runner.sh @@ -2,6 +2,18 @@ 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!" @@ -9,8 +21,8 @@ if pgrep -f "act_runner daemon" > /dev/null; then exit 1 fi -# Start the runner in the background -./act_runner daemon --config config.yaml & +# Start the runner in the background with proper PATH +PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:$PATH" ./act_runner daemon --config config.yaml & RUNNER_PID=$! # Save PID to file for easy stopping