File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -370,6 +370,23 @@ jobs:
370370 with :
371371 version : 11
372372
373+ # NOTE: jco-transpile packed should be ~2.1MB
374+ - name : Test jco-transpile package size
375+ if : ${{ needs.meta.outputs.project == 'jco-transpile' }}
376+ shell : bash
377+ env :
378+ ARTIFACT_NAME : ${{ needs.meta.outputs.artifact-name }}
379+ GH_WORKSPACE : ${{ github.workspace }}
380+ run : |
381+ export FILE="$GH_WORKSPACE/gh-artifacts/$ARTIFACT_NAME";
382+ SIZE=$(wc -c < "$FILE");
383+ MAX_SIZE=$((3 * 1024 * 1024));
384+ echo -e "::info:: jco-transpile package size ${SIZE} bytes;
385+ if (( SIZE > MAX_SIZE )); then
386+ echo "::error:: next jco-transpile NPM package artifacts should less than 3MB";
387+ exit 1;
388+ fi
389+
373390 - name : Test built jco NPM package
374391 if : ${{ needs.meta.outputs.project == 'jco' }}
375392 shell : bash
You can’t perform that action at this time.
0 commit comments