-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (58 loc) · 1.97 KB
/
build-server.yml
File metadata and controls
70 lines (58 loc) · 1.97 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
name: Build Server - CodeQL Development MCP Server
on:
pull_request:
branches: ['main', 'next']
paths:
- '.github/workflows/build-server.yml'
- '.node-version'
- 'server/**'
push:
branches: ['main', 'next']
paths:
- '.github/workflows/build-server.yml'
- '.node-version'
- 'server/**'
workflow_dispatch:
permissions:
contents: read
jobs:
build-server:
name: Build Server
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- name: Build Server - Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Build Server - Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
cache: 'npm'
node-version-file: '.node-version'
- name: Build Server - Install dependencies
run: npm ci --include=optional
working-directory: .
- name: Build Server - Clean previous build
run: npm run clean
- name: Build Server - Run tests with coverage
run: npm run test:coverage
- name: Build Server - Bundle application
run: npm run bundle
- name: Build Server - Check for uncommitted changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "❌ Uncommitted changes detected after build:"
git status --porcelain
git diff
exit 1
else
echo "✅ No uncommitted changes after build"
fi
- name: Build Server - Summary
run: |
echo "## Build Server Summary" >> $GITHUB_STEP_SUMMARY
echo "✅ ESLint checks completed" >> $GITHUB_STEP_SUMMARY
echo "✅ All tests passed with coverage" >> $GITHUB_STEP_SUMMARY
echo "✅ Application bundled successfully" >> $GITHUB_STEP_SUMMARY
echo "✅ No uncommitted changes detected" >> $GITHUB_STEP_SUMMARY