Skip to content

update evals

update evals #333

name: Integration Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
backend-integration:
name: Backend Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: backend/requirements.txt
- name: Install dependencies
run: |
cd backend
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-asyncio pytest-cov
- name: Run integration tests
run: |
cd backend
pytest tests/integration/ -v --cov=src --cov-report=xml --cov-report=html --cov-fail-under=70
env:
PYTHONPATH: ${{ github.workspace }}/backend/src
- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: always()
with:
files: backend/coverage.xml
flags: backend-integration
name: backend-integration-coverage
- name: Archive coverage HTML report
uses: actions/upload-artifact@v4
if: always()
with:
name: backend-coverage-report
path: backend/htmlcov/
frontend-e2e:
name: Frontend E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: app/package-lock.json
- name: Install dependencies
run: |
cd app
npm ci
- name: Install Playwright browsers
run: |
cd app
npx playwright install --with-deps chromium
- name: Run E2E tests
run: |
cd app
npm run test:e2e -- --project=chromium
env:
CI: true
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: app/playwright-report/
retention-days: 30
- name: Upload test screenshots
uses: actions/upload-artifact@v4
if: always()
with:
name: test-screenshots
path: app/test-results/
retention-days: 7
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [backend-integration, frontend-e2e]
if: always()
steps:
- name: Check test results
run: |
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Backend Integration Tests" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.backend-integration.result }}" == "success" ]; then
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Failed" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Frontend E2E Tests" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.frontend-e2e.result }}" == "success" ]; then
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Failed" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "View detailed reports in the artifacts section." >> $GITHUB_STEP_SUMMARY