-
Notifications
You must be signed in to change notification settings - Fork 1.2k
148 lines (132 loc) · 4.93 KB
/
e2e.yml
File metadata and controls
148 lines (132 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: E2E
on:
merge_group:
pull_request:
permissions:
contents: read
jobs:
e2e-wrangler-test:
name: ${{ format('Wrangler E2E ({0})', matrix.description) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-wrangler
cancel-in-progress: true
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
description: macOS
- os: windows-latest
description: Windows
- os: ubuntu-latest
description: Linux
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
filters: |
everything_but_markdown:
- '!**/*.md'
- name: Install Dependencies
if: steps.changes.outputs.everything_but_markdown == 'true'
uses: ./.github/actions/install-dependencies
with:
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
- name: Bump package versions
if: steps.changes.outputs.everything_but_markdown == 'true'
run: node .github/changeset-version.js
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run Wrangler E2E tests
if: steps.changes.outputs.everything_but_markdown == 'true'
run: pnpm run test:e2e:wrangler
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
HYPERDRIVE_DATABASE_URL: ${{ secrets.TEST_HYPERDRIVE_DATABASE_URL}}
HYPERDRIVE_MYSQL_DATABASE_URL: ${{ secrets.TEST_HYPERDRIVE_MYSQL_DATABASE_URL}}
NODE_OPTIONS: "--max_old_space_size=8192"
WRANGLER_LOG_PATH: ${{ runner.temp }}/wrangler-debug-logs/
TEST_REPORT_PATH: ${{ runner.temp }}/test-report/index.html
CI_OS: ${{ matrix.os }}
- name: Run getPlatformProxy() remote-bindings e2e tests
if: steps.changes.outputs.everything_but_markdown == 'true'
run: pnpm run test:e2e -F @fixture/get-platform-proxy-remote-bindings
env:
TEST_CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
TEST_CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
NODE_OPTIONS: "--max_old_space_size=8192"
CI_OS: ${{ matrix.os }}
- name: Upload turbo logs
if: always()
uses: actions/upload-artifact@v4
with:
name: turbo-runs-${{ matrix.os }}
path: .turbo/runs
e2e-vite-plugin-test:
name: ${{ format('Vite Plugin E2E ({0})', matrix.description) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-vite
cancel-in-progress: true
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
description: macOS
- os: windows-latest
description: Windows
- os: ubuntu-latest
description: Linux
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: changes
with:
filters: |
everything_but_markdown:
- '!**/*.md'
- name: Install Dependencies
if: steps.changes.outputs.everything_but_markdown == 'true'
uses: ./.github/actions/install-dependencies
with:
turbo-api: ${{ secrets.TURBO_API }}
turbo-team: ${{ secrets.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
- name: Bump package versions
if: steps.changes.outputs.everything_but_markdown == 'true'
run: node .github/changeset-version.js
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Run Vite plugin E2E tests
if: steps.changes.outputs.everything_but_markdown == 'true'
run: pnpm test:e2e -F @cloudflare/vite-plugin --log-order=stream
timeout-minutes: 20
env:
NODE_DEBUG: "vite-plugin:test"
# The remote-binding tests need to connect to Cloudflare
CLOUDFLARE_API_TOKEN: ${{ secrets.TEST_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.TEST_CLOUDFLARE_ACCOUNT_ID }}
NODE_OPTIONS: "--max_old_space_size=8192"
CI_OS: ${{ matrix.os }}
- name: Upload turbo logs
if: always()
uses: actions/upload-artifact@v4
with:
name: turbo-runs-${{ matrix.os }}
path: .turbo/runs