RNGR-34 Remove data serialization from everything operation #7543
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.13.1 | |
- run: | # retry since mongo memory server fails to download sometimes | |
yarn install || yarn install | |
- run: npm run build --if-present | |
- name: lint | |
run: | | |
npm run lint | |
build: | |
runs-on: ubuntu-latest | |
name: test (chunk ${{ matrix.chunk }}) | |
strategy: | |
matrix: | |
shard: [ 1, 2, 3, 4, 5, 6, 7, 8 ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.13.1 | |
- run: | # retry since mongo memory server fails to download sometimes | |
yarn install || yarn install | |
- run: npm run build --if-present | |
- name: show memory | |
run: | | |
export NODE_OPTIONS="--max-old-space-size=8192" | |
NODE_OPTIONS=--max-old-space-size=8192 node --max-old-space-size=8192 ./src/utils/showMemory.js | |
env: | |
NODE_OPTIONS: "--max-old-space-size=10240" | |
- name: jest | |
run: | | |
export NODE_OPTIONS="--max-old-space-size=8192" | |
NODE_OPTIONS=--max-old-space-size=8192 node --max-old-space-size=8192 ./node_modules/.bin/jest --no-watchman --silent --logHeapUsage --runInBand --forceExit --shard=${{ matrix.shard }}/${{ strategy.job-total }} --coverage | |
env: | |
NODE_OPTIONS: "--max-old-space-size=10240" | |
- name: Rename coverage file name | |
if: github.ref == 'refs/heads/main' | |
run: mv coverage/coverage-final.json coverage/${{matrix.shard}}.json | |
- name: Upload coverage file | |
uses: actions/upload-artifact@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
# starting upload-artifact@v4, multiple jobs can't upload to same artifact | |
# https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact | |
name: coverage-artifacts-${{matrix.shard}} | |
path: coverage/ |