rebase then regenerate gen docs #296
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
| # Test Upgrade Flow Workflow | |
| # | |
| # Purpose: | |
| # Run the upgrade E2E suite whenever changelog entries change so release-time | |
| # upgrade paths stay valid. | |
| # | |
| # What it tests: | |
| # 1. Selects upgrade paths from changelog.json (with optional env overrides) | |
| # 2. Scaffolds historical skeletons from git history | |
| # 3. Runs the real `h2 upgrade` command | |
| # 4. Validates dependency updates and package installation | |
| # 5. Validates upgrade guide file behavior when manual steps exist | |
| # 6. Validates build only when no manual steps and no breaking changes | |
| # | |
| # When it runs: | |
| # - On push/PR when docs/changelog.json is modified | |
| # - Manual trigger via workflow_dispatch | |
| # | |
| # This is critical for catching incomplete changelog entries before release. | |
| name: Test Upgrade Flow | |
| on: | |
| push: | |
| paths: | |
| - 'docs/changelog.json' | |
| - 'packages/cli/src/commands/hydrogen/upgrade*.ts' | |
| - 'packages/cli/vitest.e2e.config.ts' | |
| pull_request: | |
| paths: | |
| - 'docs/changelog.json' | |
| - 'packages/cli/src/commands/hydrogen/upgrade*.ts' | |
| - 'packages/cli/vitest.e2e.config.ts' | |
| workflow_dispatch: | |
| jobs: | |
| test-upgrade-flow: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 | |
| with: | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| cache-dependency-path: 'pnpm-lock.yaml' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm run build:pkg | |
| - name: Run upgrade flow tests | |
| run: | | |
| cd packages/cli | |
| pnpm exec vitest run --config vitest.e2e.config.ts | |
| env: | |
| FORCE_CHANGELOG_SOURCE: local | |
| SHOPIFY_HYDROGEN_FLAG_FORCE: 1 | |
| - name: Report test results | |
| if: always() | |
| run: | | |
| echo "✅ Upgrade flow tests completed" | |
| echo "These tests verify dynamic version detection from changelog.json" |