💾 feat: Add Memory Configuration Options for CI unit tests (#10567)

* 💾 feat: Add Memory Configuration Options for CI unit tests

- configured GitHub Actions workflows with configurable Node.js heap allocation, defaults to 6144 MiB
- added heap usage logging for memory monitoring and debugging
- increased Docker frontend build memory allocation to ensure consistent memory limits
- optimized Jest timeout for tokenSplit test

* 💾 feat: Add Memory Configuration Options for CI unit tests

- responding to PR feedback from Copilot
This commit is contained in:
Doyle 2025-12-25 16:17:17 -05:00 committed by GitHub
parent d7a765ac4c
commit b9792160e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 34 additions and 6 deletions

View file

@ -1,12 +1,16 @@
# Dockerfile.multi
# v0.8.2-rc1
# Set configurable max-old-space-size with default
ARG NODE_MAX_OLD_SPACE_SIZE=6144
# Base for all builds
FROM node:20-alpine AS base-min
# Install jemalloc
RUN apk add --no-cache jemalloc
# Set environment variable to use jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
WORKDIR /app
RUN apk --no-cache add curl
RUN npm config set fetch-retry-maxtimeout 600000 && \
@ -59,7 +63,7 @@ COPY client ./
COPY --from=data-provider-build /app/packages/data-provider/dist /app/packages/data-provider/dist
COPY --from=client-package-build /app/packages/client/dist /app/packages/client/dist
COPY --from=client-package-build /app/packages/client/src /app/packages/client/src
ENV NODE_OPTIONS="--max-old-space-size=2048"
ENV NODE_OPTIONS="--max-old-space-size=${NODE_MAX_OLD_SPACE_SIZE}"
RUN npm run build
# API setup (including client dist)