[AI: Windsurf] add: パフォーマンステストのレポート生成機能を追加 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Frontend CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'frontend/**' | |
| - 'src/frontend/**' | |
| - '.github/workflows/frontend-ci.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'frontend/**' | |
| - 'src/frontend/**' | |
| - '.github/workflows/frontend-ci.yml' | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: [3.11] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| cd frontend | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov pytest-flet | |
| - name: Run tests and generate coverage report | |
| run: | | |
| cd frontend | |
| export TESTING=True | |
| export TEST_FRONTEND_WINDOW_WIDTH=1200 | |
| export TEST_FRONTEND_WINDOW_HEIGHT=800 | |
| export TEST_FRONTEND_THEME_MODE=light | |
| export PYTHONPATH=src | |
| python -m pytest tests/ -v --cov=src/frontend --cov-report=xml:coverage.xml --cov-report=term-missing --cov-report=html | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: frontend/coverage.xml | |
| name: frontend | |
| flags: frontend | |
| fail_ci_if_error: true | |
| - name: Run linting | |
| run: | | |
| cd frontend | |
| pip install flake8 black isort | |
| flake8 src/frontend --max-line-length=88 --extend-ignore=E203,W503 --exclude=*.pyc,__pycache__ | |
| black --check src/frontend | |
| isort --check src/frontend |