-
Notifications
You must be signed in to change notification settings - Fork 88
117 lines (96 loc) · 3.35 KB
/
smoke-test-starters.yml
File metadata and controls
117 lines (96 loc) · 3.35 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
name: Starter Smoke Tests
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
pull_request:
branches:
- main
paths-ignore:
- "docs/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
jobs:
# Job for the minimal starter
smoke-test-minimal:
name: Minimal Starter
runs-on: ubuntu-latest
# context(justinvdm, 2025-05-12):
# Only run this job for PRs from the same repository and pushes to main
# For security, GH won't expose secrets for fork PRs
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: |
corepack enable
pnpm install
- name: Run smoke test for minimal starter
run: |
# Create artifact directory
mkdir -p smoke-test-artifacts/minimal
# Build SDK
cd sdk
pnpm build
# Run the minimal starter test
# todo(justinvdm, 11 Aug 2025): Fix style test flakiness
pnpm smoke-test --url="/" --path="../starters/minimal" --artifact-dir="../smoke-test-artifacts/minimal" --sync --copy-project --skip-style-tests
env:
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
- name: Upload minimal starter artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: smoke-test-artifacts-minimal
path: smoke-test-artifacts/minimal
retention-days: 7
# Job for the standard starter
smoke-test-standard:
name: Standard Starter
runs-on: ubuntu-latest
# context(justinvdm, 2025-05-12):
# Only run this job for PRs from the same repository and pushes to main
# For security, GH won't expose secrets for fork PRs
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: |
corepack enable
pnpm install
- name: Run smoke test for standard starter
run: |
# Create artifact directory
mkdir -p smoke-test-artifacts/standard
# Build SDK
cd sdk
pnpm build
# Run the standard starter test
# todo(justinvdm, 11 Aug 2025): Fix style test flakiness
pnpm smoke-test --url="/user/login" --path="../starters/standard" --artifact-dir="../smoke-test-artifacts/standard" --sync --copy-project --skip-style-tests
env:
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
- name: Upload standard starter artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: smoke-test-artifacts-standard
path: smoke-test-artifacts/standard
retention-days: 7