Skip to content

Commit b940cc8

Browse files
committed
(test) add CI step for verifying build
1 parent 6c4305f commit b940cc8

File tree

3 files changed

+2807
-1
lines changed

3 files changed

+2807
-1
lines changed

.github/workflows/server.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,30 @@ jobs:
7676
run: |
7777
pip install -r examples/server/tests/requirements.txt
7878
79+
# Setup nodejs (to be used for verifying bundled index.html)
80+
- uses: actions/setup-node@v4
81+
with:
82+
node-version: 22
83+
84+
- name: Verify bundled index.html
85+
id: verify_server_index_html
86+
run: |
87+
git config --global --add safe.directory $(realpath .)
88+
cd examples/server/webui
89+
git ls-files --others --modified
90+
git status
91+
npm ci
92+
npm run build
93+
git status
94+
not_ignored_files="$(git ls-files --others --modified)"
95+
echo "Modified files: ${not_ignored_files}"
96+
if [ -n "${not_ignored_files}" ]; then
97+
echo "Repository is dirty or server/webui is not built as expected"
98+
echo "Hint: You may need to follow Web UI build guide in server/README.md"
99+
echo "${not_ignored_files}"
100+
exit 1
101+
fi
102+
79103
- name: Build (no OpenMP)
80104
id: cmake_build_no_openmp
81105
if: ${{ matrix.sanitizer == 'THREAD' }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ examples/server/*.mjs.hpp
107107
# Server Web UI temporary files
108108
node_modules
109109
examples/server/webui/dist
110-
examples/server/webui/package-lock.json
111110

112111
# Python
113112

0 commit comments

Comments
 (0)