Skip to content

Commit 3d2e2c9

Browse files
committed
chore: test install ci
1 parent 48aaa50 commit 3d2e2c9

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "18"
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Type check
27+
run: npm run check
28+
29+
- name: Build package
30+
run: npm run build
31+
32+
- name: Check build output
33+
run: |
34+
# Verify main files exist
35+
test -f dist/index.mjs
36+
test -f dist/index.umd.js
37+
test -f dist/index.d.ts
38+
39+
# Verify file sizes are reasonable (> 1KB)
40+
test $(stat -f%z dist/index.mjs) -gt 1024
41+
test $(stat -f%z dist/index.umd.js) -gt 1024

.github/workflows/test-install.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test Install
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "18"
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Type check
27+
run: npm run check
28+
29+
- name: Build package
30+
run: npm run build
31+
32+
- name: Check build output
33+
run: |
34+
set -e
35+
36+
# Verify main files exist
37+
test -f dist/index.mjs
38+
test -f dist/index.umd.js
39+
test -f dist/index.d.ts

0 commit comments

Comments
 (0)