Compare commits

..

16 Commits

Author SHA1 Message Date
thucpn e09d980c33 try remove a use case 2025-06-13 13:48:22 +07:00
thucpn c9c675925c try streaming test 2025-06-13 13:35:20 +07:00
thucpn c031c664d2 test cancelled 2025-06-13 13:30:40 +07:00
thucpn 6ff6639495 increase timeout for ts 2025-06-13 11:53:55 +07:00
thucpn ae4068a8d9 test matrix 2025-06-13 10:33:46 +07:00
thucpn 79afe240e3 increase timeout 2025-06-13 09:41:03 +07:00
thucpn 1afbe4659e try enable hitl 2025-06-13 09:15:46 +07:00
thucpn 449e95f6fe fix hitl wait for streaming 2025-06-12 21:53:34 +07:00
thucpn f23962846f no need to log for hitl 2025-06-12 21:50:37 +07:00
thucpn 685e9425bc test: change message 2025-06-12 21:33:01 +07:00
thucpn 278f861ed2 only hitl 2025-06-12 21:10:04 +07:00
thucpn bcbfb2492d test timeout 2025-06-12 18:29:02 +07:00
thucpn 5827732290 Merge branch 'tp/fix-hitl-e2e-test' of github.com:run-llama/create-llama into tp/fix-hitl-e2e-test 2025-06-12 18:18:27 +07:00
thucpn 8d330d50ae test e2e 2025-06-12 18:18:05 +07:00
Thuc Pham ca8be82ef3 Merge branch 'main' into tp/fix-hitl-e2e-test 2025-06-12 18:09:40 +07:00
thucpn b545c4baa1 fix: hitl e2e tests 2025-06-12 18:07:47 +07:00
3 changed files with 14 additions and 92 deletions
+3 -85
View File
@@ -12,99 +12,17 @@ on:
- ".github/workflows/*llama_index_server.yml"
jobs:
e2e-python:
name: python
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
node-version: [20]
python-version: ["3.11"]
os: [macos-latest, windows-latest, ubuntu-22.04]
frameworks: ["fastapi"]
datasources: ["--no-files", "--example-file", "--llamacloud"]
template-types: ["streaming", "llamaindexserver"]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Add uv to PATH # Ensure uv is available in subsequent steps
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: pnpm/action-setup@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
working-directory: packages/create-llama
- name: Build create-llama
run: pnpm run build
working-directory: packages/create-llama
- name: Install
run: pnpm run pack-install
working-directory: packages/create-llama
- name: Build and store server package
run: |
pnpm run build
wheel_file=$(ls dist/*.whl | head -n 1)
mkdir -p "${{ runner.temp }}"
cp "$wheel_file" "${{ runner.temp }}/"
echo "SERVER_PACKAGE_PATH=${{ runner.temp }}/$(basename "$wheel_file")" >> $GITHUB_ENV
working-directory: python/llama-index-server
- name: Run Playwright tests for Python
run: pnpm run e2e:python
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LLAMA_CLOUD_API_KEY: ${{ secrets.LLAMA_CLOUD_API_KEY }}
FRAMEWORK: ${{ matrix.frameworks }}
DATASOURCE: ${{ matrix.datasources }}
TEMPLATE_TYPE: ${{ matrix.template-types }}
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: utf-8
SERVER_PACKAGE_PATH: ${{ env.SERVER_PACKAGE_PATH }}
working-directory: packages/create-llama
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-python-${{ matrix.os }}-${{ matrix.frameworks }}-${{ matrix.datasources }}-${{ matrix.template-types }}
path: packages/create-llama/playwright-report/
overwrite: true
retention-days: 30
e2e-typescript:
name: typescript
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
node-version: [20, 22]
node-version: [20]
python-version: ["3.11"]
os: [macos-latest, windows-latest, ubuntu-22.04]
os: [ubuntu-22.04]
frameworks: ["nextjs"]
datasources: ["--no-files", "--example-file", "--llamacloud"]
datasources: ["--example-file"]
template-types: ["streaming", "llamaindexserver"]
defaults:
run:
@@ -24,10 +24,10 @@ const appType: AppType = "--frontend";
const userMessage = "Write a blog post about physical standards for letters";
const templateUseCases = [
"agentic_rag",
"financial_report",
// "financial_report",
"deep_research",
"code_generator",
// "hitl",
"hitl",
];
const ejectDir = "next";
@@ -104,10 +104,14 @@ for (const useCase of templateUseCases) {
const response = await responsePromise;
console.log(`Response status: ${response.status()}`);
const responseBody = await response
.text()
.catch((e) => `Error reading body: ${e}`);
console.log(`Response body: ${responseBody}`);
if (useCase !== "hitl") {
// No need to wait for response body of HITL since it responds immediately without streaming
const responseBody = await response
.text()
.catch((e) => `Error reading body: ${e}`);
console.log(`Response body: ${responseBody}`);
}
expect(response.ok()).toBeTruthy();
});
+1 -1
View File
@@ -6,7 +6,7 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
timeout: 1000 * 60 * 5,
timeout: 1000 * 60 * 20,
reporter: "html",
use: {
trace: "on-first-retry",