-
Notifications
You must be signed in to change notification settings - Fork 176
184 lines (180 loc) · 6.04 KB
/
frontend.yml
File metadata and controls
184 lines (180 loc) · 6.04 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: frontend
on:
pull_request:
paths:
- .github/workflows/frontend.yml
- frontend/**
- engine/sdks/typescript/**
- rivetkit-typescript/**
- website/**
concurrency:
group: frontend-${{ github.ref }}
cancel-in-progress: true
jobs:
dashboard-quality-check:
name: Dashboard / Quality Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: biomejs/setup-biome@v2
with:
version: latest
- run: biome check ./frontend --formatter-enabled=true --linter-enabled=false --assist-enabled=false --reporter=github
rivetkit-quality-check:
name: RivetKit / Quality Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: biomejs/setup-biome@v2
with:
version: latest
- run: biome check ./rivetkit-typescript --formatter-enabled=true --linter-enabled=false --assist-enabled=false --reporter=github
# website-quality-check:
# name: Website / Quality Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: biomejs/setup-biome@v2
# with:
# version: latest
# - run: biome check ./website --reporter=github
dashboard-type-check:
name: Dashboard / Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- run: pnpm install --frozen-lockfile
- run: pnpm build --filter='./frontend'
env:
NODE_OPTIONS: '--max-old-space-size=8192'
- run: pnpm check-types
working-directory: ./frontend
rivetkit-type-check:
name: RivetKit / Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- run: pnpm install --frozen-lockfile
- run: pnpm exec turbo run build --filter='./rivetkit-typescript/packages/*'
- run: pnpm exec turbo run check-types --filter='./rivetkit-typescript/packages/*'
# website-type-check:
# name: Website / Type Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# lfs: 'true'
# - uses: pnpm/action-setup@v4
# - uses: actions/setup-node@v4
# with:
# node-version-file: .node-version
# cache: pnpm
# - uses: actions/cache@v4
# with:
# path: .turbo
# key: ${{ runner.os }}-turbo-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-turbo-
# - run: pnpm install --frozen-lockfile
# - run: pnpm build
# - run: pnpm check-types
# working-directory: ./website
dashboard-e2e-cloud:
name: Dashboard / E2E Tests / Cloud (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1]
shardTotal: [1]
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('frontend/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-
- run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
working-directory: ./frontend
- name: Install Playwright system deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: pnpm exec playwright install-deps chromium
working-directory: ./frontend
- name: Build frontend workspace dependencies
run: pnpm build --filter='./frontend'
env:
NODE_OPTIONS: '--max-old-space-size=8192'
- name: Build cloud dashboard
run: pnpm build:cloud
working-directory: ./frontend
env:
NODE_OPTIONS: '--max-old-space-size=8192'
VITE_APP_CLERK_PUBLISHABLE_KEY: ${{ secrets.E2E_CLERK_PUBLISHABLE_KEY }}
VITE_APP_CLOUD_API_URL: ${{ secrets.E2E_CLOUD_API_URL }}
VITE_APP_API_URL: https://api.staging.rivet.dev
- name: Run cloud E2E tests
run: pnpm exec playwright test --project=cloud --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=list,github
working-directory: ./frontend
env:
CLERK_SECRET_KEY: ${{ secrets.E2E_CLERK_SECRET_KEY }}
CLERK_PUBLISHABLE_KEY: ${{ secrets.E2E_CLERK_PUBLISHABLE_KEY }}
E2E_CLERK_USER_EMAIL: ${{ secrets.E2E_CLERK_USER_EMAIL }}
E2E_CLERK_USER_PASSWORD: ${{ secrets.E2E_CLERK_USER_PASSWORD }}
- name: Upload HTML report
uses: actions/upload-artifact@v4
if: always()
with:
name: cloud-e2e-report-${{ matrix.shardIndex }}
path: frontend/playwright-report/
retention-days: 7
- name: Upload traces
uses: actions/upload-artifact@v4
if: always()
with:
name: cloud-e2e-traces-${{ matrix.shardIndex }}
path: frontend/test-results/
retention-days: 7