feat(web-hub): add zhiz binding continuation flow #26
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: Browser Extension Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "browser/**" | |
| - "core/**" | |
| - "tests/**" | |
| - ".github/workflows/browser-test.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "browser/**" | |
| - "core/**" | |
| - "tests/**" | |
| - ".github/workflows/browser-test.yml" | |
| jobs: | |
| # ── Unit Tests ───────────────────────────────────────────────────────────── | |
| unit-tests: | |
| name: Unit Tests (Vitest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: browser/package-lock.json | |
| - name: Install browser dependencies | |
| run: cd browser && npm ci | |
| - name: Run Vitest unit tests | |
| run: cd browser && npm run test:unit | |
| - name: Run parity tests | |
| run: node tests/test-parity.js | |
| # ── Build All Browsers ───────────────────────────────────────────────────── | |
| build-browsers: | |
| name: Build All Browsers | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: | | |
| browser/package-lock.json | |
| package-lock.json | |
| - name: Install dependencies | |
| run: cd browser && npm ci | |
| - name: Build Chrome | |
| run: cd browser && npm run build:chrome | |
| - name: Build Firefox | |
| run: cd browser && npm run build:firefox | |
| - name: Build Safari | |
| run: cd browser && npm run build:safari | |
| - name: Build Edge | |
| run: cd browser && npm run build:edge | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: browser-dist | |
| path: | | |
| browser/dist/chrome-mv3/ | |
| browser/dist/firefox-mv3/ | |
| browser/dist/safari-mv3/ | |
| browser/dist/edge-mv3/ | |
| retention-days: 7 | |
| # ── E2E Tests ────────────────────────────────────────────────────────────── | |
| e2e-tests: | |
| name: E2E Tests (Playwright) | |
| runs-on: ubuntu-latest | |
| needs: build-browsers | |
| strategy: | |
| matrix: | |
| # Firefox extension E2E is not supported by Playwright; Edge MV3 is | |
| # validated via bundled Chromium loading dist/edge-mv3. | |
| browser: [chromium, edge] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Install dependencies | |
| run: cd browser && npm ci | |
| - name: Install Playwright browsers | |
| run: cd browser && npx playwright install --with-deps chromium | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: browser-dist | |
| path: browser/dist/ | |
| - name: Run E2E tests (${{ matrix.browser }}) | |
| run: cd browser && npx playwright test --project=${{ matrix.browser }} | |
| - name: Upload E2E test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-results-${{ matrix.browser }} | |
| path: | | |
| browser/playwright-report/ | |
| browser/test-results/ | |
| retention-days: 7 | |
| # ── TypeScript Type Check ────────────────────────────────────────────────── | |
| typecheck: | |
| name: TypeScript Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: browser/package-lock.json | |
| - name: Install dependencies | |
| run: cd browser && npm ci | |
| - name: Run TypeScript type check | |
| run: cd browser && npm run typecheck |