|
4 | 4 | workflow_dispatch: |
5 | 5 | pull_request: |
6 | 6 | types: [opened, reopened, ready_for_review, synchronize] |
7 | | - paths: |
8 | | - - "src/**" |
9 | | - - "webview-ui/**" |
10 | | - - "apps/vscode-e2e/**" |
11 | | - - "packages/core/**" |
12 | | - - "package.json" |
13 | | - - "pnpm-lock.yaml" |
14 | | - - "turbo.json" |
15 | | - - ".github/actions/setup-node-pnpm/**" |
16 | 7 | merge_group: |
17 | 8 | types: [checks_requested] |
18 | 9 |
|
|
23 | 14 | steps: |
24 | 15 | - name: Checkout code |
25 | 16 | uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Restore mocked E2E pass marker |
| 19 | + id: e2e-marker |
| 20 | + uses: actions/cache/restore@v4 |
| 21 | + with: |
| 22 | + path: .cache/e2e-pass |
| 23 | + key: ${{ runner.os }}-mocked-e2e-${{ hashFiles('src/**', 'webview-ui/**', 'apps/vscode-e2e/**', 'packages/core/**', 'package.json', 'pnpm-lock.yaml', 'turbo.json', '.github/workflows/e2e.yml', '.github/actions/setup-node-pnpm/**') }} |
| 24 | + |
| 25 | + - name: Use cached mocked E2E result |
| 26 | + if: github.event_name == 'pull_request' && steps.e2e-marker.outputs.cache-hit == 'true' |
| 27 | + run: echo "Skipping mocked E2E tests because this source hash already passed." |
| 28 | + |
26 | 29 | - name: Setup Node.js and pnpm |
| 30 | + if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true' |
27 | 31 | uses: ./.github/actions/setup-node-pnpm |
28 | 32 | - name: Install xvfb |
| 33 | + if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true' |
29 | 34 | run: sudo apt-get install -y xvfb |
30 | 35 | - name: Run mocked E2E tests |
| 36 | + if: github.event_name != 'pull_request' || steps.e2e-marker.outputs.cache-hit != 'true' |
31 | 37 | run: xvfb-run -a pnpm --filter @roo-code/vscode-e2e test:ci:mock |
| 38 | + |
| 39 | + - name: Write mocked E2E pass marker |
| 40 | + if: steps.e2e-marker.outputs.cache-hit != 'true' |
| 41 | + run: mkdir -p .cache/e2e-pass && date -u > .cache/e2e-pass/passed |
| 42 | + |
| 43 | + - name: Save mocked E2E pass marker |
| 44 | + if: steps.e2e-marker.outputs.cache-hit != 'true' |
| 45 | + continue-on-error: true |
| 46 | + uses: actions/cache/save@v4 |
| 47 | + with: |
| 48 | + path: .cache/e2e-pass |
| 49 | + key: ${{ steps.e2e-marker.outputs.cache-primary-key }} |
0 commit comments