|
| 1 | +name: Org E2E (Playwright) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches-ignore: [main, develop] |
| 7 | + paths-ignore: |
| 8 | + - '.claude/**' |
| 9 | + - '.cursor/**' |
| 10 | + - 'contributing/**' |
| 11 | + - 'CONTRIBUTING.md' |
| 12 | + - 'docs/**' |
| 13 | + - '**/README*' |
| 14 | + - 'SECURITY*' |
| 15 | + - 'CODE_OF_CONDUCT*' |
| 16 | + - 'CHANGELOG*' |
| 17 | + - '**/CHANGELOG*' |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: ci-${{ github.ref }}-orgE2E |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +jobs: |
| 24 | + e2e-desktop: |
| 25 | + runs-on: ${{ matrix.os }} |
| 26 | + timeout-minutes: 60 |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + os: [macos-latest, windows-latest] |
| 30 | + fail-fast: false |
| 31 | + |
| 32 | + env: |
| 33 | + VSCODE_DESKTOP: 1 |
| 34 | + PLAYWRIGHT_DESKTOP_VSCODE_VERSION: ${{ vars.PLAYWRIGHT_DESKTOP_VSCODE_VERSION }} |
| 35 | + steps: |
| 36 | + - name: Checkout repository |
| 37 | + uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + fetch-depth: 1 |
| 40 | + |
| 41 | + - name: Setup Node.js |
| 42 | + uses: actions/setup-node@v4 |
| 43 | + with: |
| 44 | + node-version: '22' |
| 45 | + cache: 'npm' |
| 46 | + |
| 47 | + - uses: google/wireit@setup-github-actions-caching/v2 |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main |
| 51 | + |
| 52 | + # No Salesforce CLI or scratch org — tests use a temp project folder only (see org test fixtures). |
| 53 | + - name: Try E2E tests |
| 54 | + id: try-run |
| 55 | + continue-on-error: true |
| 56 | + timeout-minutes: 5 |
| 57 | + env: |
| 58 | + CI: 1 |
| 59 | + VSCODE_DESKTOP: 1 |
| 60 | + E2E_NO_RETRIES: 1 |
| 61 | + run: | |
| 62 | + npm run test:desktop -w salesforcedx-vscode-org -- --reporter=html |
| 63 | +
|
| 64 | + - name: Install Playwright browsers and OS deps |
| 65 | + if: steps.try-run.outcome == 'failure' |
| 66 | + run: npx playwright install chromium --with-deps |
| 67 | + |
| 68 | + - name: Run Org E2E tests (parallel) |
| 69 | + if: steps.try-run.outcome == 'failure' |
| 70 | + id: parallel-run |
| 71 | + continue-on-error: true |
| 72 | + env: |
| 73 | + CI: 1 |
| 74 | + VSCODE_DESKTOP: 1 |
| 75 | + run: | |
| 76 | + npm run test:desktop -w salesforcedx-vscode-org -- --reporter=html |
| 77 | +
|
| 78 | + - name: Retry failed tests (sequential) |
| 79 | + if: steps.try-run.outcome == 'failure' && steps.parallel-run.outcome == 'failure' |
| 80 | + env: |
| 81 | + CI: 1 |
| 82 | + VSCODE_DESKTOP: 1 |
| 83 | + E2E_SEQUENTIAL: 1 |
| 84 | + run: | |
| 85 | + npm run test:desktop -w salesforcedx-vscode-org -- --last-failed --reporter=html |
| 86 | +
|
| 87 | + - name: Upload Playwright HTML report |
| 88 | + if: always() |
| 89 | + uses: actions/upload-artifact@v4 |
| 90 | + with: |
| 91 | + name: playwright-report-org-desktop-${{ matrix.os }} |
| 92 | + path: packages/salesforcedx-vscode-org/playwright-report |
| 93 | + if-no-files-found: ignore |
| 94 | + |
| 95 | + - name: Upload Playwright test results |
| 96 | + if: always() |
| 97 | + uses: actions/upload-artifact@v4 |
| 98 | + with: |
| 99 | + name: playwright-test-results-org-desktop-${{ matrix.os }} |
| 100 | + path: packages/salesforcedx-vscode-org/test-results |
| 101 | + if-no-files-found: ignore |
0 commit comments