|
1 | 1 | name: "Copilot Setup Steps" |
2 | 2 |
|
3 | | -# This workflow configures the environment for GitHub Copilot Agent with gh-aw MCP server |
| 3 | +# This workflow configures the environment for GitHub Copilot Agent |
| 4 | +# Automatically run the setup steps when they are changed to allow for easy validation |
4 | 5 | on: |
5 | 6 | workflow_dispatch: |
6 | 7 | push: |
7 | 8 | paths: |
8 | 9 | - .github/workflows/copilot-setup-steps.yml |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - .github/workflows/copilot-setup-steps.yml |
9 | 13 |
|
10 | 14 | jobs: |
11 | 15 | # The job MUST be called 'copilot-setup-steps' to be recognized by GitHub Copilot Agent |
|
18 | 22 | contents: read |
19 | 23 |
|
20 | 24 | steps: |
| 25 | + # Checkout the repository to install dependencies |
| 26 | + - name: Checkout code |
| 27 | + uses: actions/checkout@v6.0.2 |
| 28 | + |
| 29 | + # Setup Node.js (for TypeScript/JavaScript SDK and tooling) |
| 30 | + - name: Set up Node.js |
| 31 | + uses: actions/setup-node@v6 |
| 32 | + with: |
| 33 | + node-version: "22" |
| 34 | + cache: "npm" |
| 35 | + cache-dependency-path: | |
| 36 | + ./nodejs/package-lock.json |
| 37 | + ./test/harness/package-lock.json |
| 38 | +
|
| 39 | + # Setup Python (for Python SDK) |
| 40 | + - name: Set up Python |
| 41 | + uses: actions/setup-python@v6 |
| 42 | + with: |
| 43 | + python-version: "3.12" |
| 44 | + |
| 45 | + # Setup uv (Python package manager used in this repo) |
| 46 | + - name: Set up uv |
| 47 | + uses: astral-sh/setup-uv@v7 |
| 48 | + with: |
| 49 | + enable-cache: true |
| 50 | + |
| 51 | + # Setup Go (for Go SDK) |
| 52 | + - name: Set up Go |
| 53 | + uses: actions/setup-go@v6 |
| 54 | + with: |
| 55 | + go-version: "1.23" |
| 56 | + |
| 57 | + # Setup .NET (for .NET SDK) |
| 58 | + - name: Set up .NET |
| 59 | + uses: actions/setup-dotnet@v5 |
| 60 | + with: |
| 61 | + dotnet-version: "8.0.x" |
| 62 | + |
| 63 | + # Install just command runner |
| 64 | + - name: Install just |
| 65 | + uses: extractions/setup-just@v3 |
| 66 | + |
| 67 | + # Install gh-aw extension for advanced GitHub CLI features |
21 | 68 | - name: Install gh-aw extension |
22 | 69 | run: | |
23 | 70 | curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash |
24 | | - - name: Verify gh-aw installation |
25 | | - run: gh aw version |
| 71 | +
|
| 72 | + # Install JavaScript dependencies |
| 73 | + - name: Install Node.js dependencies |
| 74 | + working-directory: ./nodejs |
| 75 | + run: npm ci --ignore-scripts |
| 76 | + |
| 77 | + # Install Python dependencies |
| 78 | + - name: Install Python dependencies |
| 79 | + working-directory: ./python |
| 80 | + run: uv sync --locked --all-extras --dev |
| 81 | + |
| 82 | + # Install Go dependencies |
| 83 | + - name: Install Go dependencies |
| 84 | + working-directory: ./go |
| 85 | + run: go mod download |
| 86 | + |
| 87 | + # Restore .NET dependencies |
| 88 | + - name: Restore .NET dependencies |
| 89 | + working-directory: ./dotnet |
| 90 | + run: dotnet restore |
| 91 | + |
| 92 | + # Install test harness dependencies |
| 93 | + - name: Install test harness dependencies |
| 94 | + working-directory: ./test/harness |
| 95 | + run: npm ci --ignore-scripts |
| 96 | + |
| 97 | + # Verify installations |
| 98 | + - name: Verify tool installations |
| 99 | + run: | |
| 100 | + echo "=== Verifying installations ===" |
| 101 | + node --version |
| 102 | + npm --version |
| 103 | + python --version |
| 104 | + uv --version |
| 105 | + go version |
| 106 | + dotnet --version |
| 107 | + just --version |
| 108 | + gh --version |
| 109 | + gh aw version |
| 110 | + echo "✅ All tools installed successfully" |
0 commit comments