@@ -187,6 +187,68 @@ jobs:
187187 name : smoke-test-results
188188 path : junit-smoke.xml
189189
190+ test-regression :
191+ name : Regression Tests
192+ runs-on : ubuntu-latest
193+ needs : test-unit
194+ if : |
195+ contains(github.event.pull_request.labels.*.name, 'test-regression') ||
196+ contains(github.event.pull_request.labels.*.name, 'regression')
197+
198+ steps :
199+ - uses : actions/checkout@v4
200+
201+ - name : Set up Python 3.11
202+ uses : actions/setup-python@v4
203+ with :
204+ python-version : " 3.11"
205+
206+ - name : Install system dependencies
207+ run : |
208+ sudo apt-get update
209+ sudo apt-get install -y xvfb
210+
211+ - name : Install dependencies
212+ run : |
213+ python -m pip install --upgrade pip
214+ pip install -e ".[dev]"
215+ pip install jsonschema
216+ # Install temporary Google GenAI wheel
217+ pip install temp/google_genai-1.14.0-py3-none-any.whl
218+ playwright install chromium
219+ playwright install-deps chromium
220+
221+ - name : Run regression tests
222+ run : |
223+ xvfb-run -a pytest tests/ -v \
224+ --cov=stagehand \
225+ --cov-report=xml \
226+ --junit-xml=junit-regression.xml \
227+ -m "regression" \
228+ --tb=short \
229+ --maxfail=10
230+ env :
231+ BROWSERBASE_API_KEY : ${{ secrets.BROWSERBASE_API_KEY || 'mock-api-key' }}
232+ BROWSERBASE_PROJECT_ID : ${{ secrets.BROWSERBASE_PROJECT_ID || 'mock-project-id' }}
233+ MODEL_API_KEY : ${{ secrets.MODEL_API_KEY || 'mock-model-key' }}
234+ STAGEHAND_API_URL : ${{ secrets.STAGEHAND_API_URL || 'http://localhost:3000' }}
235+
236+ - name : Upload regression test results
237+ uses : actions/upload-artifact@v4
238+ if : always()
239+ with :
240+ name : regression-test-results
241+ path : junit-regression.xml
242+
243+ - name : Upload coverage data
244+ uses : actions/upload-artifact@v4
245+ if : always()
246+ with :
247+ name : coverage-data-regression
248+ path : |
249+ .coverage
250+ coverage.xml
251+
190252 test-e2e :
191253 name : End-to-End Tests
192254 runs-on : ubuntu-latest
0 commit comments