Skip to content

Commit 1360c9b

Browse files
authored
Split Wrangler and Vite E2Es into separate workflows (cloudflare#12849)
1 parent 5d49380 commit 1360c9b

3 files changed

Lines changed: 85 additions & 68 deletions

File tree

.github/workflows/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ See below for a summary of this repo's Actions
1818
- Adds the PR to a GitHub project
1919
- Makes sure that Wrangler's warning for old Node.js versions works.
2020

21-
### E2E tests (e2e.yml)
21+
### Wrangler E2E tests (e2e-wrangler.yml)
2222

2323
- Triggers
2424
- Updates to PRs on the Cloudflare fork.
2525
- PRs in the merge queue.
2626
- Actions
27-
- Runs the E2E tests for Wrangler & Vite.
27+
- Runs the E2E tests for Wrangler.
28+
29+
### Vite Plugin E2E tests (e2e-vite.yml)
30+
31+
- Triggers
32+
- Updates to PRs on the Cloudflare fork.
33+
- PRs in the merge queue.
34+
- Actions
35+
- Runs the E2E tests for the Vite plugin.
2836

2937
## Deploy Pages Previews (deploy-pages-preview.yml)
3038

.github/workflows/e2e-vite.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Vite Plugin E2E
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
e2e-vite-plugin-test:
12+
name: ${{ format('Vite Plugin E2E ({0})', matrix.description) }}
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}
15+
cancel-in-progress: true
16+
timeout-minutes: 60
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- os: macos-latest
22+
description: macOS
23+
- os: windows-latest
24+
description: Windows
25+
- os: ubuntu-latest
26+
description: Linux
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout Repo
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
35+
id: changes
36+
with:
37+
filters: |
38+
everything_but_markdown:
39+
- '!**/*.md'
40+
41+
- name: Install Dependencies
42+
if: steps.changes.outputs.everything_but_markdown == 'true'
43+
uses: ./.github/actions/install-dependencies
44+
with:
45+
turbo-api: ${{ secrets.TURBO_API }}
46+
turbo-team: ${{ secrets.TURBO_TEAM }}
47+
turbo-token: ${{ secrets.TURBO_TOKEN }}
48+
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
49+
50+
- name: Bump package versions
51+
if: steps.changes.outputs.everything_but_markdown == 'true'
52+
run: node .github/changeset-version.js
53+
env:
54+
GITHUB_TOKEN: ${{ github.token }}
55+
56+
- name: Run Vite plugin E2E tests
57+
if: steps.changes.outputs.everything_but_markdown == 'true'
58+
run: pnpm test:e2e -F @cloudflare/vite-plugin --log-order=stream
59+
timeout-minutes: 20
60+
env:
61+
NODE_DEBUG: "vite-plugin:test"
62+
# The remote-binding tests need to connect to Cloudflare
63+
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
64+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
65+
NODE_OPTIONS: "--max_old_space_size=8192"
66+
CI_OS: ${{ matrix.os }}
67+
68+
- name: Upload turbo logs
69+
if: always()
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: turbo-runs-${{ matrix.os }}
73+
path: .turbo/runs
Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: E2E
1+
name: Wrangler E2E
22

33
on:
44
merge_group:
@@ -11,7 +11,7 @@ jobs:
1111
e2e-wrangler-test:
1212
name: ${{ format('Wrangler E2E ({0})', matrix.description) }}
1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-wrangler
14+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}
1515
cancel-in-progress: true
1616
timeout-minutes: 60
1717
strategy:
@@ -82,67 +82,3 @@ jobs:
8282
with:
8383
name: turbo-runs-${{ matrix.os }}
8484
path: .turbo/runs
85-
86-
e2e-vite-plugin-test:
87-
name: ${{ format('Vite Plugin E2E ({0})', matrix.description) }}
88-
concurrency:
89-
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-vite
90-
cancel-in-progress: true
91-
timeout-minutes: 60
92-
strategy:
93-
fail-fast: false
94-
matrix:
95-
include:
96-
- os: macos-latest
97-
description: macOS
98-
- os: windows-latest
99-
description: Windows
100-
- os: ubuntu-latest
101-
description: Linux
102-
runs-on: ${{ matrix.os }}
103-
steps:
104-
- name: Checkout Repo
105-
uses: actions/checkout@v4
106-
with:
107-
fetch-depth: 0
108-
109-
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
110-
id: changes
111-
with:
112-
filters: |
113-
everything_but_markdown:
114-
- '!**/*.md'
115-
116-
- name: Install Dependencies
117-
if: steps.changes.outputs.everything_but_markdown == 'true'
118-
uses: ./.github/actions/install-dependencies
119-
with:
120-
turbo-api: ${{ secrets.TURBO_API }}
121-
turbo-team: ${{ secrets.TURBO_TEAM }}
122-
turbo-token: ${{ secrets.TURBO_TOKEN }}
123-
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
124-
125-
- name: Bump package versions
126-
if: steps.changes.outputs.everything_but_markdown == 'true'
127-
run: node .github/changeset-version.js
128-
env:
129-
GITHUB_TOKEN: ${{ github.token }}
130-
131-
- name: Run Vite plugin E2E tests
132-
if: steps.changes.outputs.everything_but_markdown == 'true'
133-
run: pnpm test:e2e -F @cloudflare/vite-plugin --log-order=stream
134-
timeout-minutes: 20
135-
env:
136-
NODE_DEBUG: "vite-plugin:test"
137-
# The remote-binding tests need to connect to Cloudflare
138-
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
139-
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
140-
NODE_OPTIONS: "--max_old_space_size=8192"
141-
CI_OS: ${{ matrix.os }}
142-
143-
- name: Upload turbo logs
144-
if: always()
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: turbo-runs-${{ matrix.os }}
148-
path: .turbo/runs

0 commit comments

Comments
 (0)