🔒 Migrate JavaScript installs to pnpm #333
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: SDK E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # Core JS Client (test-site with Playwright) | |
| core-js: | |
| name: Core JS Client | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Install test-site dependencies | |
| working-directory: ./test-site | |
| run: pnpm install --frozen-lockfile | |
| - name: Get Playwright version | |
| id: playwright-version | |
| run: echo "version=$(pnpm exec playwright --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }}-firefox | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: ./test-site | |
| run: pnpm exec playwright install firefox --with-deps | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./test-site | |
| run: node ../bin/vizzly.js tdd run "pnpm test" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./test-site | |
| run: node ../bin/vizzly.js run "pnpm test" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| # Vitest SDK | |
| vitest: | |
| name: Vitest SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Install Vitest client dependencies | |
| working-directory: ./clients/vitest | |
| run: pnpm install --frozen-lockfile | |
| - name: Get Playwright version | |
| working-directory: ./clients/vitest | |
| id: playwright-version | |
| run: echo "version=$(pnpm exec playwright --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }}-chromium | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: ./clients/vitest | |
| run: pnpm exec playwright install chromium --with-deps | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/vitest | |
| run: ../../bin/vizzly.js tdd run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/vitest | |
| run: ../../bin/vizzly.js run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_VITEST_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| # Storybook SDK | |
| storybook: | |
| name: Storybook SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Install Storybook client dependencies | |
| working-directory: ./clients/storybook | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Storybook client | |
| working-directory: ./clients/storybook | |
| run: pnpm run build | |
| - name: Get Playwright version | |
| working-directory: ./clients/storybook | |
| id: playwright-version | |
| run: echo "version=$(node -p "require('playwright-core/package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }}-storybook-chromium | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: ./clients/storybook | |
| run: pnpm exec playwright-core install chromium --with-deps | |
| - name: Build example-storybook | |
| working-directory: ./clients/storybook/example-storybook | |
| run: pnpm install --frozen-lockfile && pnpm run build-storybook | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/storybook | |
| run: ../../bin/vizzly.js tdd run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| VIZZLY_LOG_LEVEL: debug | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/storybook | |
| run: ../../bin/vizzly.js run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| VIZZLY_LOG_LEVEL: debug | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_STORYBOOK_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| - name: Upload preview | |
| if: success() | |
| working-directory: ./clients/storybook | |
| run: ../../bin/vizzly.js preview example-storybook/dist | |
| env: | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_STORYBOOK_CLIENT_TOKEN }} | |
| # Static-Site SDK | |
| static-site: | |
| name: Static-Site SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Install Static-Site client dependencies | |
| working-directory: ./clients/static-site | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Static-Site client | |
| working-directory: ./clients/static-site | |
| run: pnpm run build | |
| - name: Get Playwright version | |
| working-directory: ./clients/static-site | |
| id: playwright-version | |
| run: echo "version=$(node -p "require('playwright-core/package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }}-static-site-chromium | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: ./clients/static-site | |
| run: pnpm exec playwright-core install chromium --with-deps | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/static-site | |
| run: ../../bin/vizzly.js tdd run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/static-site | |
| run: ../../bin/vizzly.js run "pnpm run test:e2e" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_STATIC_SITE_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| - name: Upload preview | |
| working-directory: ./clients/static-site | |
| run: ../../bin/vizzly.js preview ../../test-site | |
| env: | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_STATIC_SITE_CLIENT_TOKEN }} | |
| # Ember SDK | |
| ember: | |
| name: Ember SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Install Ember client dependencies | |
| working-directory: ./clients/ember | |
| run: pnpm install --frozen-lockfile | |
| - name: Get Playwright version | |
| working-directory: ./clients/ember | |
| id: playwright-version | |
| run: echo "version=$(pnpm exec playwright-core --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }}-ember-chromium-v3 | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| working-directory: ./clients/ember | |
| run: pnpm exec playwright-core install chromium --with-deps | |
| - name: Build Ember test app | |
| working-directory: ./clients/ember/test-app | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm run build -- --mode development | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/ember/test-app | |
| run: ../../../bin/vizzly.js tdd run "pnpm exec testem ci --file testem.cjs" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/ember/test-app | |
| run: ../../../bin/vizzly.js run "pnpm exec testem ci --file testem.cjs" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_EMBER_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| # Ruby SDK | |
| ruby: | |
| name: Ruby SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@97ecb7b512899eb71ab1bf2310a624c6f1589ac6 # v1 | |
| with: | |
| ruby-version: '3.3' | |
| - name: Set up Chrome | |
| uses: browser-actions/setup-chrome@086160e580d6e8c142ad5ba29009dcde677c6321 # v2 | |
| with: | |
| chrome-version: stable | |
| - name: Install Ruby dependencies | |
| working-directory: ./clients/ruby | |
| run: | | |
| gem install bundler | |
| bundle install | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/ruby | |
| run: ../../bin/vizzly.js tdd run "VIZZLY_E2E=1 ruby -Ilib:test test/e2e_test.rb" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/ruby | |
| run: ../../bin/vizzly.js run "VIZZLY_E2E=1 ruby -Ilib:test test/e2e_test.rb" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_RUBY_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| # Swift SDK | |
| swift: | |
| name: Swift SDK | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: 22 | |
| - name: Install pnpm | |
| run: corepack enable && corepack prepare pnpm@11.3.0 --activate | |
| - name: Install CLI dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build CLI | |
| run: pnpm run build | |
| - name: Build Swift package | |
| working-directory: ./clients/swift | |
| run: swift build | |
| - name: Run E2E tests (TDD mode) | |
| working-directory: ./clients/swift | |
| run: ../../bin/vizzly.js tdd run "VIZZLY_E2E=1 swift test --filter VizzlyE2ETests" | |
| env: | |
| CI: true | |
| - name: Run E2E tests (Cloud mode) | |
| working-directory: ./clients/swift | |
| run: ../../bin/vizzly.js run "VIZZLY_E2E=1 swift test --filter VizzlyE2ETests" | |
| env: | |
| CI: true | |
| VIZZLY_TOKEN: ${{ secrets.VIZZLY_SWIFT_CLIENT_TOKEN }} | |
| VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }} | |
| VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }} | |
| # Status check for branch protection | |
| check: | |
| name: E2E Status | |
| runs-on: ubuntu-latest | |
| needs: [core-js, vitest, storybook, static-site, ember, ruby, swift] | |
| if: always() | |
| steps: | |
| - name: Check all SDK E2E tests passed | |
| run: | | |
| if [[ "${{ needs.core-js.result }}" == "failure" ]]; then | |
| echo "Core JS Client E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.vitest.result }}" == "failure" ]]; then | |
| echo "Vitest SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.storybook.result }}" == "failure" ]]; then | |
| echo "Storybook SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.static-site.result }}" == "failure" ]]; then | |
| echo "Static-Site SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.ember.result }}" == "failure" ]]; then | |
| echo "Ember SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.ruby.result }}" == "failure" ]]; then | |
| echo "Ruby SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.swift.result }}" == "failure" ]]; then | |
| echo "Swift SDK E2E tests failed" | |
| exit 1 | |
| fi | |
| echo "All SDK E2E tests passed" |