Files
evotraders/.github/workflows/test_browser_agent_test.yml
2025-10-31 11:04:34 +08:00

48 lines
1.2 KiB
YAML

name: BrowserAgent Tests
on:
schedule:
- cron: '0 0 */3 * *'
workflow_dispatch:
jobs:
test:
name: Run Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Debug directory structure
run: |
# ✅ Show actual directory structure
echo "Current directory: $(pwd)"
ls -la
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install Dependencies
run: |
cd browser_agent/agent_browser
python -m pip install --upgrade pip
pip install pytest pytest-asyncio
pip install -r requirements.txt
- name: Run Tests
env:
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
run: |
# ✅ Ensure test-results directory exists
mkdir -p test-results
# ✅ Run tests with XML output
python -m pytest tests/browser_agent_test.py -v