-
Notifications
You must be signed in to change notification settings - Fork 8
90 lines (72 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
90 lines (72 loc) · 2.71 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
name: CI
# Validates every pull request (and pushes to main) before merge. Prior to
# this workflow the only GitHub Action was the post-merge docs deploy, so a PR
# whose `tsc -b` / unit tests were red could still be merged green — exactly
# what happened with #114. This gate makes those failures block the merge.
#
# Two jobs:
# data — @adobe/data core: typecheck (tsc -b + WASM), lint, unit tests.
# packages — downstream published packages: build (tsc -b) + tests for each.
# Runs after `data` so a core failure surfaces once, not twice.
# @adobe/data is rebuilt here to provide dist/ for downstream tsc.
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
data:
name: "@adobe/data — typecheck, lint, test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
with:
version: 9
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Type-check (tsc -b, project references)
run: pnpm --filter @adobe/data run typecheck
- name: Lint
run: pnpm --filter @adobe/data run lint
- name: Unit tests
run: pnpm --filter @adobe/data run test:ci
packages:
name: "downstream packages — build, test"
runs-on: ubuntu-latest
needs: [data]
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
with:
version: 9
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build @adobe/data (provides dist/ for downstream tsc)
run: pnpm --filter @adobe/data run typecheck
- name: Build every downstream package (type-check via tsc -b / vite)
# Builds ALL workspace packages except the core (already built above),
# including the private, unscoped sample apps (data-p2p-tictactoe,
# data-lit-todo, …). A previous `--filter '@adobe/data-*'` only matched
# scoped published packages, so a type/build error that surfaced only in
# a private sample (e.g. a stripped `.d.ts` member) merged green.
run: pnpm --filter '!@adobe/data' run build
- name: Test downstream packages
run: |
pnpm --filter @adobe/data-lit \
--filter @adobe/data-gpu \
--filter @adobe/data-react \
--filter @adobe/data-solid \
--filter @adobe/data-sync \
run test
pnpm --filter @adobe/data-persistence run test:node