The Gitea Actions Runner doesn't have Node.js installed, causing actions/checkout@v3 (a JavaScript action) to fail with "Cannot find: node in PATH". Replace with native shell-based git checkout that works without Node.js and uses Gitea context variables for repository URL.
58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: Test Runner
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- staging
|
|
- main
|
|
|
|
jobs:
|
|
test-basic:
|
|
runs-on: self-hosted
|
|
steps:
|
|
# Manual checkout - works without Node.js
|
|
- name: Checkout code
|
|
run: |
|
|
echo "📥 Checking out repository..."
|
|
if [ -d ".git" ]; then
|
|
git fetch origin
|
|
git checkout ${{ github.ref_name }}
|
|
git reset --hard origin/${{ github.ref_name }}
|
|
else
|
|
git clone --branch ${{ github.ref_name }} --single-branch ${{ github.server_url }}/${{ github.repository }}.git .
|
|
fi
|
|
|
|
- name: Test basic runner
|
|
run: |
|
|
echo "✅ Runner is working!"
|
|
echo "Runner OS: $(uname -a)"
|
|
echo "Docker version: $(docker --version || echo 'Docker not available')"
|
|
echo "Current directory: $(pwd)"
|
|
echo "Git branch: $(git rev-parse --abbrev-ref HEAD)"
|
|
echo "Git commit: $(git rev-parse --short HEAD)"
|
|
|
|
test-php:
|
|
runs-on: php-ci
|
|
steps:
|
|
# Manual checkout - works without Node.js
|
|
- name: Checkout code
|
|
run: |
|
|
echo "📥 Checking out repository..."
|
|
if [ -d ".git" ]; then
|
|
git fetch origin
|
|
git checkout ${{ github.ref_name }}
|
|
git reset --hard origin/${{ github.ref_name }}
|
|
else
|
|
git clone --branch ${{ github.ref_name }} --single-branch ${{ github.server_url }}/${{ github.repository }}.git .
|
|
fi
|
|
|
|
- name: Test PHP environment
|
|
run: |
|
|
echo "✅ PHP Runner is working!"
|
|
php -v
|
|
composer --version
|
|
echo "PHP Extensions:"
|
|
php -m | grep -E "(pdo|redis|zip|gd|mbstring)" || echo "Some extensions not found"
|
|
|