ci: derive pull request scope from project metadata (#402) #469
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E | |
| on: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| cockpit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - uses: actions/setup-node@v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install Python dependencies | |
| working-directory: cockpit/langgraph/streaming/python | |
| run: uv sync | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run cockpit example aimock e2e suites | |
| run: | | |
| set -e | |
| for proj in cockpit-langgraph-streaming-angular cockpit-chat-tool-calls-angular cockpit-chat-subagents-angular; do | |
| echo "::group::nx e2e $proj" | |
| npx nx e2e "$proj" --skip-nx-cache | |
| echo "::endgroup::" | |
| sleep 5 | |
| done | |
| e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| - uses: actions/setup-node@v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install Python dependencies | |
| working-directory: examples/chat/python | |
| run: uv sync | |
| - name: Start LangGraph dev server | |
| working-directory: examples/chat/python | |
| run: uv run langgraph dev --no-browser & | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }} | |
| LANGSMITH_TRACING: "true" | |
| LANGSMITH_PROJECT: agent-e2e-ci | |
| - name: Wait for server to be ready | |
| run: | | |
| echo "Waiting for LangGraph server..." | |
| for i in {1..30}; do | |
| curl -sf http://localhost:2024/ok && echo "Server ready" && break | |
| echo "Attempt $i/30..." | |
| sleep 2 | |
| done | |
| curl -sf http://localhost:2024/ok || (echo "Server failed to start after 60s" && exit 1) | |
| - name: Run e2e tests | |
| run: npx nx e2e agent-e2e | |
| env: | |
| LANGGRAPH_URL: http://localhost:2024 |