docs: Add Product Search documentation #223
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linter | |
| run: npm run lint | |
| type-check: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run type-check | |
| unit-tests: | |
| name: Unit Tests (${{ matrix.locale }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| locale: ["en", "pl"] | |
| services: | |
| mongodb: | |
| image: mongo:7 | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| MONGODB_URI: mongodb://localhost:27017/cognito-test | |
| TEST_LOCALE: ${{ matrix.locale }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test -- --run | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| e2e-tests: | |
| name: E2E Tests (${{ matrix.locale }} - ${{ matrix.browser }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| locale: ["en", "pl"] | |
| browser: ["Mobile Chrome", "Desktop Chrome"] | |
| services: | |
| mongodb: | |
| image: mongo:7 | |
| ports: | |
| - 27017:27017 | |
| options: >- | |
| --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| weaviate: | |
| image: semitechnologies/weaviate:1.34.4 | |
| ports: | |
| - 8080:8080 | |
| - 50051:50051 | |
| env: | |
| AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "false" | |
| AUTHENTICATION_APIKEY_ENABLED: "true" | |
| AUTHENTICATION_APIKEY_ALLOWED_KEYS: "e2e-test-key" | |
| AUTHENTICATION_APIKEY_USERS: "e2e-test-user" | |
| PERSISTENCE_DATA_PATH: "/var/lib/weaviate" | |
| QUERY_DEFAULTS_LIMIT: "1000" | |
| CLUSTER_HOSTNAME: "node1" | |
| env: | |
| MONGODB_URI: mongodb://localhost:27017/cognito-e2e | |
| WEAVIATE_HTTP_HOST: localhost | |
| WEAVIATE_HTTP_PORT: 8080 | |
| WEAVIATE_GRPC_HOST: localhost | |
| WEAVIATE_GRPC_PORT: 50051 | |
| WEAVIATE_SECURE: false | |
| WEAVIATE_API_KEY: e2e-test-key | |
| NEXTAUTH_SECRET: e2e-test-secret-key-change-in-production | |
| NEXTAUTH_URL: http://localhost:2137 | |
| TEST_SERVER_URL: http://localhost:2137 | |
| TEST_LOCALE: ${{ matrix.locale }} | |
| NODE_ENV: production | |
| PORT: 2137 | |
| AUTH_TRUST_HOST: http://localhost:3000 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci --include=dev | |
| - name: Build project | |
| run: npm run build | |
| - name: Install Playwright browsers | |
| run: npx playwright install chromium --with-deps | |
| - name: Run E2E tests | |
| run: npm run test:e2e -- --project='${{ matrix.browser }}' | |
| - name: Upload Playwright report on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{ matrix.locale }}-${{ matrix.browser }} | |
| path: playwright-report/ | |
| retention-days: 7 |