💾 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
This commit is contained in:
Doyle 2025-11-10 11:45:03 -05:00
parent 3213f574c6
commit b8fe41e59d
11 changed files with 31 additions and 7 deletions

View file

@ -24,6 +24,7 @@ jobs:
BAN_DURATION: ${{ secrets.BAN_DURATION }}
BAN_INTERVAL: ${{ secrets.BAN_INTERVAL }}
NODE_ENV: CI
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x

View file

@ -26,7 +26,7 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build --build-arg RUNNER_VERSION=${{ env.RUNNER_VERSION }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/pwd9000-github-runner-lin:${{ env.RUNNER_VERSION }} .
docker build --build-arg RUNNER_VERSION=${{ env.RUNNER_VERSION }} --build-arg NODE_MAX_OLD_SPACE_SIZE=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/pwd9000-github-runner-lin:${{ env.RUNNER_VERSION }} .
- name: 'Push container image to ACR'
uses: azure/docker-login@v1

View file

@ -16,6 +16,8 @@ jobs:
name: Run frontend unit tests on Ubuntu
timeout-minutes: 60
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
@ -38,6 +40,8 @@ jobs:
name: Run frontend unit tests on Windows
timeout-minutes: 60
runs-on: windows-latest
env:
NODE_OPTIONS: '--max-old-space-size=${{ secrets.NODE_MAX_OLD_SPACE_SIZE || 6144 }}'
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x