Skip to content

Feature/better favourite images #27

Feature/better favourite images

Feature/better favourite images #27

Workflow file for this run

name: Tests
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
workflow_dispatch:
jobs:
backend-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run backend tests with coverage
run: |
python -m pytest tests/test_*.py --cov=. --cov-report=xml --cov-report=term-missing -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: backend
name: backend-coverage
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Playwright browsers
run: |
playwright install chromium
- name: Run E2E tests
run: |
python -m pytest tests/e2e/ -v --browser chromium
- name: Upload E2E test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-test-results
path: |
test-results/
screenshots/
retention-days: 7
integration-tests:
runs-on: ubuntu-latest
needs: [backend-tests, e2e-tests]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Playwright browsers
run: |
playwright install chromium
- name: Run full test suite
run: |
python run_tests.py --coverage
- name: Generate test report
if: always()
run: |
echo "## Test Summary" >> $GITHUB_STEP_SUMMARY
echo "✅ Backend tests completed" >> $GITHUB_STEP_SUMMARY
echo "✅ E2E tests completed" >> $GITHUB_STEP_SUMMARY
echo "🎯 Full integration test suite passed" >> $GITHUB_STEP_SUMMARY