Repository navigation
53 lines (42 loc) · 1.52 KB
/
Copy pathui-test.yml
File metadata and controls
53 lines (42 loc) · 1.52 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
name: UI Tests
# Unit tests for packages/ui (`pnpm --filter @prisma-docs/ui test`). Runs on
# every PR rather than behind a path filter: the suite renders @prisma/eclipse
# components and its tests may read source elsewhere in the repo (such as the
# app layouts that load shared ui scripts), so a change outside packages/ui can
# break it, and a run is only a filtered install, an Eclipse build and a few
# seconds of tests.
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ui-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: Unit Tests (UI)
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Install and test run dependency code; nothing here needs git auth.
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter "@prisma-docs/ui..."
# The newsletter form imports @prisma/eclipse, whose package entry is the
# built dist. The install does not produce it.
- name: Build Eclipse
run: pnpm --filter @prisma/eclipse build
- name: Run unit tests
run: pnpm --filter @prisma-docs/ui test