-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.23 KB
/
ci.yml
File metadata and controls
44 lines (36 loc) · 1.23 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies (if needed)
run: npm install
- name: Run build
run: npm run build
- name: Check build output
run: |
if [ ! -f "dist/tinypine.min.js" ]; then
echo "Build failed - dist/tinypine.min.js not found"
exit 1
fi
echo "✅ Build successful"
ls -lh dist/
- name: Check file size
run: |
SIZE=$(stat -f%z dist/tinypine.min.js 2>/dev/null || stat -c%s dist/tinypine.min.js 2>/dev/null)
SIZE_KB=$((SIZE / 1024))
echo "📦 Bundle size: ${SIZE_KB} KB"
if [ $SIZE_KB -gt 10 ]; then
echo "⚠️ Warning: Bundle size exceeds 10KB"
fi