@@ -106,12 +106,12 @@ jobs:
106106
107107 - name : Run local integration tests
108108 run : |
109- # Run integration tests marked as 'local ' and not 'slow '
109+ # Run integration tests marked as 'integration ' and 'local '
110110 xvfb-run -a pytest tests/integration/ -v \
111111 --cov=stagehand \
112112 --cov-report=xml \
113113 --junit-xml=junit-integration-local.xml \
114- -m "local and not slow " \
114+ -m "integration and local " \
115115 --tb=short \
116116 --maxfail=5
117117 env :
@@ -190,14 +190,14 @@ jobs:
190190 name : integration-test-results-slow
191191 path : junit-integration-slow.xml
192192
193- test-browserbase :
194- name : Browserbase Integration Tests
193+ test-integration-api :
194+ name : API Integration Tests
195195 runs-on : ubuntu-latest
196196 needs : test-unit
197197 if : |
198198 github.event_name == 'schedule' ||
199- contains(github.event.pull_request.labels.*.name, 'test-browserbase ') ||
200- contains(github.event.pull_request.labels.*.name, 'browserbase ')
199+ contains(github.event.pull_request.labels.*.name, 'test-api ') ||
200+ contains(github.event.pull_request.labels.*.name, 'api ')
201201
202202 steps :
203203 - uses : actions/checkout@v4
@@ -215,26 +215,26 @@ jobs:
215215 # Install temporary Google GenAI wheel
216216 pip install temp/google_genai-1.14.0-py3-none-any.whl
217217
218- - name : Run Browserbase tests
218+ - name : Run API integration tests
219219 run : |
220- pytest tests/ -v \
220+ pytest tests/integration/ -v \
221221 --cov=stagehand \
222222 --cov-report=xml \
223- --junit-xml=junit-browserbase .xml \
224- -m "browserbase " \
223+ --junit-xml=junit-integration-api .xml \
224+ -m "integration and api " \
225225 --tb=short
226226 env :
227227 BROWSERBASE_API_KEY : ${{ secrets.BROWSERBASE_API_KEY }}
228228 BROWSERBASE_PROJECT_ID : ${{ secrets.BROWSERBASE_PROJECT_ID }}
229229 MODEL_API_KEY : ${{ secrets.MODEL_API_KEY }}
230230 STAGEHAND_API_URL : ${{ secrets.STAGEHAND_API_URL }}
231231
232- - name : Upload Browserbase test results
232+ - name : Upload API integration test results
233233 uses : actions/upload-artifact@v4
234234 if : always()
235235 with :
236- name : browserbase -test-results
237- path : junit-browserbase .xml
236+ name : api-integration -test-results
237+ path : junit-integration-api .xml
238238
239239 test-performance :
240240 name : Performance Tests
@@ -373,6 +373,11 @@ jobs:
373373 with :
374374 python-version : " 3.11"
375375
376+ - name : Install system dependencies
377+ run : |
378+ sudo apt-get update
379+ sudo apt-get install -y xvfb
380+
376381 - name : Install dependencies
377382 run : |
378383 python -m pip install --upgrade pip
@@ -381,10 +386,11 @@ jobs:
381386 # Install temporary Google GenAI wheel
382387 pip install temp/google_genai-1.14.0-py3-none-any.whl
383388 playwright install chromium
389+ playwright install-deps chromium
384390
385391 - name : Run E2E tests
386392 run : |
387- pytest tests/ -v \
393+ xvfb-run -a pytest tests/ -v \
388394 --cov=stagehand \
389395 --cov-report=xml \
390396 --junit-xml=junit-e2e.xml \
@@ -395,6 +401,7 @@ jobs:
395401 BROWSERBASE_PROJECT_ID : ${{ secrets.BROWSERBASE_PROJECT_ID || 'mock-project-id' }}
396402 MODEL_API_KEY : ${{ secrets.MODEL_API_KEY || 'mock-model-key' }}
397403 STAGEHAND_API_URL : ${{ secrets.STAGEHAND_API_URL || 'http://localhost:3000' }}
404+ DISPLAY : " :99"
398405
399406 - name : Upload E2E test results
400407 uses : actions/upload-artifact@v4
0 commit comments