name: Test Workflow

on:
  push:
    tags:
      - 'v*'

jobs:
  test:
    name: Test Environment
    runs-on: ubuntu-latest
    
    steps:
    - name: Print environment variables
      run: |
        echo "=== Environment Variables ==="
        echo "GITEA_REF_NAME: ${{ gitea.ref_name }}"
        echo "GITEA_SHA: ${{ gitea.sha }}"
        echo "GITEA_REPOSITORY: ${{ gitea.repository }}"
        echo "GITEA_TOKEN: ${GITEA_TOKEN:0:10}..."
        echo "GITEA_SERVER_URL: $GITEA_SERVER_URL"
        echo "GITEA_REPOSITORY: $GITEA_REPOSITORY"
        echo ""
        
        # 检查可用命令
        echo "=== Available Commands ==="
        which git && echo "✅ git available" || echo "❌ git not found"
        which curl && echo "✅ curl available" || echo "❌ curl not found"
        which zip && echo "✅ zip available" || echo "❌ zip not found"
        which jq && echo "✅ jq available" || echo "❌ jq not found"
        echo ""
        
        # 检查网络
        echo "=== Network Test ==="
        curl -I https://sh.rustup.rs | head -1
