feat(konsta): adaptive UI components — Konsta rendering on mobile #934
Workflow file for this run
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: Test Suite | |
| on: | |
| push: | |
| branches: [main, develop, "version/*", "feat/machine-hosted-pwa"] | |
| pull_request: | |
| branches: [main, develop, "version/*"] | |
| jobs: | |
| # ============================================================================ | |
| # Relay Server Tests (Python/FastAPI) | |
| # ============================================================================ | |
| server-tests: | |
| name: Server Tests (Python) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/server | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: "pip" | |
| cache-dependency-path: apps/server/requirements-test.txt | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements-test.txt | |
| - name: Run Python tests with coverage | |
| env: | |
| GEMINI_API_KEY: test_key_for_ci | |
| run: | | |
| pytest test_main.py test_logging.py test_taste_compass.py test_recommendations.py -v \ | |
| --cov=main --cov=logging_config --cov=config \ | |
| --cov=prompt_builder --cov=api --cov=services \ | |
| --cov=utils --cov=models \ | |
| --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./apps/server/coverage.xml | |
| flags: relay | |
| name: server-coverage | |
| - name: Check coverage threshold | |
| run: coverage report --fail-under=68 | |
| # ============================================================================ | |
| # Web Frontend Tests (TypeScript/React) | |
| # ============================================================================ | |
| web-tests: | |
| name: Web Tests (TypeScript) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/web | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup Bun (attempt 1) | |
| id: setup_bun_1 | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pin Bun for CI reproducibility and transient download stability. | |
| # Keep this in sync with docker/Dockerfile.unified bun base image. | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 2) | |
| id: setup_bun_2 | |
| if: steps.setup_bun_1.outcome == 'failure' | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 3) | |
| if: steps.setup_bun_2.outcome == 'failure' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run linter | |
| run: bun run lint | |
| - name: Run unit tests | |
| run: bun run test:run | |
| - name: Run direct-mode tests | |
| run: bun run test:direct | |
| - name: Generate coverage report | |
| run: bun run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./apps/web/coverage/coverage-final.json | |
| flags: web | |
| name: web-coverage | |
| # ============================================================================ | |
| # Web E2E Tests (Playwright) | |
| # ============================================================================ | |
| web-e2e-tests: | |
| name: Web E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: [web-tests] | |
| defaults: | |
| run: | |
| working-directory: apps/web | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Setup Bun (attempt 1) | |
| id: setup_bun_1 | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pin Bun for CI reproducibility and transient download stability. | |
| # Keep this in sync with docker/Dockerfile.unified bun base image. | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 2) | |
| id: setup_bun_2 | |
| if: steps.setup_bun_1.outcome == 'failure' | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 3) | |
| if: steps.setup_bun_2.outcome == 'failure' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| run: bunx playwright install --with-deps | |
| - name: Run E2E tests | |
| run: bun run e2e | |
| - name: Upload Playwright Report | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: apps/web/playwright-report/ | |
| retention-days: 30 | |
| # ============================================================================ | |
| # Docker Build Tests | |
| # ============================================================================ | |
| docker-build: | |
| name: Docker Build Test | |
| runs-on: ubuntu-latest | |
| needs: [server-tests, web-tests] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build unified image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.unified | |
| push: false | |
| load: true | |
| tags: meticai:test | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Test container starts | |
| run: | | |
| docker run -d --name test-container \ | |
| -p 3550:3550 \ | |
| -e GEMINI_API_KEY=test \ | |
| -e METICULOUS_IP=127.0.0.1 \ | |
| meticai:test | |
| # Wait for container to start | |
| sleep 15 | |
| # Check container is running | |
| docker ps | grep test-container | |
| # Check health endpoint | |
| docker exec test-container curl -f http://localhost:3550/health || exit 1 | |
| - name: Setup Bun (attempt 1) | |
| id: setup_bun_1 | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pin Bun for CI reproducibility and transient download stability. | |
| # Keep this in sync with docker/Dockerfile.unified bun base image. | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 2) | |
| id: setup_bun_2 | |
| if: steps.setup_bun_1.outcome == 'failure' | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 3) | |
| if: steps.setup_bun_2.outcome == 'failure' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install web dependencies | |
| working-directory: apps/web | |
| run: bun install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| working-directory: apps/web | |
| run: bunx playwright install --with-deps chromium | |
| - name: Run integration E2E tests (verify-tasks) | |
| working-directory: apps/web | |
| run: bunx playwright test e2e/verify-tasks.spec.ts | |
| env: | |
| BASE_URL: http://localhost:3550 | |
| - name: Upload Integration Test Report | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: integration-test-report | |
| path: apps/web/playwright-report/ | |
| retention-days: 30 | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| docker stop test-container || true | |
| docker rm test-container || true | |
| # ============================================================================ | |
| # Code Quality | |
| # ============================================================================ | |
| lint: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install Python linting tools | |
| run: pip install ruff black | |
| - name: Run ruff on relay | |
| run: ruff check apps/server/ | |
| continue-on-error: true | |
| - name: Check Python formatting | |
| run: black --check apps/server/ | |
| continue-on-error: true | |
| - name: Setup Bun (attempt 1) | |
| id: setup_bun_1 | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| # Pin Bun for CI reproducibility and transient download stability. | |
| # Keep this in sync with docker/Dockerfile.unified bun base image. | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 2) | |
| id: setup_bun_2 | |
| if: steps.setup_bun_1.outcome == 'failure' | |
| continue-on-error: true | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Setup Bun (attempt 3) | |
| if: steps.setup_bun_2.outcome == 'failure' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.10 | |
| - name: Install web dependencies | |
| run: | | |
| cd apps/web | |
| bun install --frozen-lockfile | |
| - name: Lint web | |
| run: | | |
| cd apps/web | |
| bun run lint | |
| continue-on-error: true | |
| - name: Lint shell scripts | |
| run: | | |
| sudo apt-get install -y shellcheck | |
| shellcheck scripts/*.sh || true | |
| - name: Check for hard-coded UI strings | |
| continue-on-error: true | |
| run: | | |
| echo "::warning::Checking for hard-coded user-facing strings..." | |
| FOUND=$(grep -rn --include='*.tsx' --include='*.ts' \ | |
| -E 'toast\.(success|error|info|warning)\s*\(\s*['"'"'"`]' \ | |
| apps/web/src/ \ | |
| | grep -v '\.test\.' | grep -v '\.spec\.' \ | |
| | grep -v 't(' || true) | |
| if [ -n "$FOUND" ]; then | |
| echo "::warning::Found potential hard-coded toast strings:" | |
| echo "$FOUND" | |
| echo "" | |
| echo "Consider using i18n t() for these strings." | |
| else | |
| echo "✅ No hard-coded toast strings detected" | |
| fi | |
| # ============================================================================ | |
| # Windows Installer Tests (PowerShell/Pester) | |
| # ============================================================================ | |
| windows-installer-tests: | |
| name: Windows Installer Tests (Pester) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Pester | |
| shell: pwsh | |
| run: | | |
| Install-Module -Name Pester -MinimumVersion 5.0 -Force -Scope CurrentUser | |
| - name: Run Pester tests | |
| shell: pwsh | |
| run: | | |
| $config = New-PesterConfiguration | |
| $config.Run.Path = "./scripts/install.Tests.ps1" | |
| $config.Run.Exit = $true | |
| $config.Output.Verbosity = "Detailed" | |
| $config.TestResult.Enabled = $true | |
| $config.TestResult.OutputPath = "pester-results.xml" | |
| $config.TestResult.OutputFormat = "JUnitXml" | |
| Invoke-Pester -Configuration $config | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pester-test-results | |
| path: pester-results.xml | |
| retention-days: 30 |