-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (59 loc) · 2.03 KB
/
test.yml
File metadata and controls
76 lines (59 loc) · 2.03 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
name: Test & Verify
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
name: Test & Verify Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build plugin
run: npm run build
- name: Verify plugin integrity
run: npm run verify
- name: Verify build output
run: |
echo "Checking admin build..."
test -f "dist/admin/index.js" && echo "✓ Admin JS built" || exit 1
test -f "dist/admin/index.mjs" && echo "✓ Admin MJS built" || exit 1
echo "Checking server build..."
test -f "dist/server/index.js" && echo "✓ Server JS built" || exit 1
test -f "dist/server/index.mjs" && echo "✓ Server MJS built" || exit 1
echo "✓ All build artifacts present"
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm install
- name: Check file structure
run: |
echo "Verifying plugin structure..."
test -d "admin/src" && echo "✓ Admin src found" || exit 1
test -d "server/src" && echo "✓ Server src found" || exit 1
test -f "package.json" && echo "✓ package.json found" || exit 1
test -f ".releaserc.json" && echo "✓ .releaserc.json found" || exit 1
test -f "README.md" && echo "✓ README.md found" || exit 1
test -f "LICENSE" && echo "✓ LICENSE found" || exit 1
echo "✓ All required files present"