Skip to content

Commit 607da0e

Browse files
committed
Add github workflow to run on PRs
1 parent 4d78fa4 commit 607da0e

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

.github/workflows/dojo-e2e.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: e2e
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
e2e:
11+
name: E2E Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9.0.0
27+
28+
- name: Install Poetry
29+
uses: snok/install-poetry@v1
30+
with:
31+
version: latest
32+
virtualenvs-create: true
33+
virtualenvs-in-project: true
34+
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v6
37+
38+
- name: Setup pnpm cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.local/share/pnpm/store
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
46+
- name: Install dependencies
47+
working-directory: typescript-sdk
48+
run: pnpm install --frozen-lockfile
49+
50+
- name: Prepare dojo for e2e
51+
working-directory: typescript-sdk/apps/dojo
52+
run: node ./scripts/prep-dojo-everything.js -e2e
53+
54+
- name: Install e2e dependencies
55+
working-directory: typescript-sdk/apps/dojo/e2e2
56+
run: |
57+
pnpm install --frozen-lockfile
58+
pnpm dlx playwright install --with-deps
59+
60+
- name: write langgraph env files
61+
working-directory: typescript-sdk/integrations/langgraph
62+
env:
63+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
64+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
65+
run: |
66+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/python/.env
67+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/python/.env
68+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/typescript/.env
69+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/typescript/.env
70+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > python/ag_ui_langgraph/.env
71+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> python/ag_ui_langgraph/.env
72+
73+
- name: Run dojo+agents and tests
74+
working-directory: typescript-sdk/apps/dojo/e2e2
75+
env:
76+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
77+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
78+
run: |
79+
node ../scripts/run-dojo-everything.js &
80+
npx wait-port 9999
81+
sleep 10
82+
pnpm exec playwright test --reporter=dot
83+
84+
- name: Upload traces
85+
if: always() # Uploads artifacts even if tests fail
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: playwright-traces
89+
path: typescript-sdk/apps/dojo/e2e2/test-results/
90+
retention-days: 7

0 commit comments

Comments
 (0)