copilot-setup-steps.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: "Copilot Setup Steps"
  2. # Automatically run the setup steps when they are changed to allow for easy validation, and
  3. # allow manual testing through the repository's "Actions" tab
  4. on:
  5. workflow_dispatch:
  6. push:
  7. paths:
  8. - .github/workflows/copilot-setup-steps.yml
  9. pull_request:
  10. paths:
  11. - .github/workflows/copilot-setup-steps.yml
  12. jobs:
  13. # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
  14. copilot-setup-steps:
  15. runs-on: ubuntu-latest
  16. # Timeout after 30 minutes (maximum is 59)
  17. timeout-minutes: 30
  18. # You can define any steps you want, and they will run before the agent starts.
  19. # If you do not check out your code, Copilot will do this for you.
  20. steps:
  21. - name: Checkout code
  22. uses: actions/checkout@v6
  23. - name: Set up Python 3.11
  24. uses: actions/setup-python@v6
  25. with:
  26. python-version: '3.11'
  27. - name: Cache pip packages
  28. uses: actions/cache@v5
  29. with:
  30. path: ~/.cache/pip
  31. key: ${{ runner.os }}-pip-copilot-${{ hashFiles('**/pyproject.toml') }}
  32. restore-keys: |
  33. ${{ runner.os }}-pip-copilot-
  34. ${{ runner.os }}-pip-
  35. - name: Install Python dependencies
  36. run: |
  37. python -m pip install --upgrade pip
  38. pip install -e ".[api]"
  39. pip install pytest pytest-asyncio httpx
  40. - name: Create minimal frontend stub for Copilot agent
  41. run: |
  42. mkdir -p lightrag/api/webui
  43. echo '<!DOCTYPE html><html><head><title>LightRAG - Copilot Agent</title></head><body><h1>Copilot Agent Mode</h1></body></html>' > lightrag/api/webui/index.html
  44. echo "Created minimal frontend stub for Copilot agent environment"
  45. - name: Verify installation
  46. run: |
  47. python --version
  48. pip list | grep lightrag
  49. lightrag-server --help || echo "Note: Server requires .env configuration to run"