-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.35 KB
/
code-quality.yml
File metadata and controls
54 lines (45 loc) · 1.35 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
name: Code Quality
on:
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
quality-checks:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Type check all packages
run: npm run type-check
- name: Check for TypeScript errors
run: |
echo "Checking for TypeScript compilation errors..."
npm run build 2>&1 | tee build.log
if grep -i "error TS" build.log; then
echo "TypeScript errors found!"
exit 1
fi
echo "No TypeScript errors found."
- name: Check package structure
run: |
echo "Verifying package structure..."
test -f packages/core/package.json || exit 1
test -f packages/examples/package.json || exit 1
test -d packages/core/src || exit 1
test -d packages/examples/src || exit 1
echo "Package structure verified."
- name: Verify examples can run
run: |
echo "Testing if examples can execute..."
npm run build
npm run example:basic
echo "Examples verified successfully."