Repository navigation
68 lines (65 loc) · 2.65 KB
/
Copy pathci.yml
File metadata and controls
68 lines (65 loc) · 2.65 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
name: ci
on:
pull_request:
push:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run check
- run: bun run build
- run: bun run contrast-test
- run: bun run dep-guard
- run: bunx playwright install --with-deps chromium
- run: bun run test:e2e
- name: node consumer smoke
run: |
set -euo pipefail
TARBALL="$PWD/$(npm pack --silent)"
mkdir -p "$RUNNER_TEMP/c" && cd "$RUNNER_TEMP/c"
npm init -y >/dev/null && npm pkg set type=module >/dev/null
npm install "$TARBALL"
# One runtime export from each module the chat family puts in
# src/index.ts, so a dropped `export *` line fails here and not in a
# consumer's build. lib/conversation.js is types only and has none.
# A forwardRef component is an object, so presence is the check.
node --input-type=module -e '
const m = await import("@corbits/react-ui");
const names = [
"Button", "Badge",
"usePromptInput", "useResizable", "useTabs", "useTabDrag", "useCopy",
"useHistoryWindow", "useReadingPosition", "useAttachments",
"useFileDrop", "useMediaViewer",
"groupActivity", "mediaKindOf", "checkAttachments", "matchPromptTokens",
"Conversation", "ConversationDivider", "ConversationEarlier",
"ConversationMap", "ConversationThread",
"PromptInput", "PromptInputToolbar", "Panel", "PanelTabs",
"Tool", "ToolApproval", "ToolGroup", "Reasoning", "Activity",
"Message", "MessageFold", "MessageActions", "MessageReactions",
"MessageReplies", "Attachments", "AttachmentDropZone",
"GeneratedImages", "Sources", "MediaViewer", "MessageParts",
];
const missing = names.filter((n) => m[n] === undefined);
if (missing.length) throw new Error("missing exports: " + missing.join(", "));
'
policy-check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
checks: read
contents: read
pull-requests: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: corbitsdev/corbits-triage/packages/policy-check-action@28a902e9a6e2f7ec53c581425b72d97c6800fc89