fix(officecli-templates): rebuild commonly-data.xlsx via officecli na… #635
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: Playwright Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'frontend/**' | |
| - 'backend/**' | |
| - 'e2e/**' | |
| - 'playwright.config.*' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'frontend/**' | |
| - 'backend/**' | |
| - 'e2e/**' | |
| - 'playwright.config.*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| services: | |
| mongo: | |
| image: mongo:7 | |
| ports: ["27017:27017"] | |
| options: >- | |
| --health-cmd "mongosh --eval 'db.runCommand(\"ping\").ok'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| postgres: | |
| image: postgres:16 | |
| ports: ["5432:5432"] | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: commonly | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| JWT_SECRET: e2e-test-jwt-secret | |
| FRONTEND_URL: http://localhost:5173 | |
| MONGO_URI: mongodb://localhost:27017/commonly-e2e | |
| PG_HOST: localhost | |
| PG_PORT: "5432" | |
| PG_DATABASE: commonly | |
| PG_USER: postgres | |
| PG_PASSWORD: postgres | |
| PG_SSL_ENABLED: "false" | |
| NODE_ENV: test | |
| # SENDGRID_API_KEY intentionally omitted — backend auto-verifies users without it | |
| E2E_BASE_URL: http://localhost:5173 | |
| E2E_API_URL: http://localhost:5000 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: '**/package-lock.json' | |
| - name: Install root dependencies | |
| run: npm ci --include=dev | |
| - name: Install backend dependencies | |
| run: cd backend && npm ci --include=dev | |
| - name: Install frontend dependencies | |
| run: cd frontend && npm install --legacy-peer-deps | |
| - name: Install Playwright browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Start backend | |
| run: | | |
| cd backend | |
| npm run build | |
| node dist/server.js & | |
| echo $! > /tmp/backend.pid | |
| - name: Wait for backend | |
| run: npx wait-on http://localhost:5000/api/health/live --timeout 30000 | |
| - name: Build frontend | |
| run: cd frontend && VITE_API_URL=http://localhost:5000 npm run build | |
| - name: Start frontend preview | |
| run: | | |
| cd frontend | |
| npx vite preview --port 5173 --host & | |
| echo $! > /tmp/frontend.pid | |
| - name: Wait for frontend | |
| run: npx wait-on http://localhost:5173 --timeout 30000 | |
| - name: Run Playwright tests | |
| run: npx playwright test --project=chromium | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |