From b8719586e3ec919c89ab8c52b6a1b06d3727cb66 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 18 Oct 2024 17:26:40 -0700 Subject: [PATCH] ci: pack all module under packages (#1345) --- .github/workflows/test.yml | 53 ++++++++++++++------------------------ 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1fe48431a..91816ab94b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -136,39 +136,26 @@ jobs: run: pnpm run build - name: Copy examples run: rsync -rv --exclude=node_modules ./examples ${{ runner.temp }} - - name: Pack @llamaindex/cloud - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/cloud - - name: Pack @llamaindex/openai - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/openai - - name: Pack @llamaindex/deepinfra - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/deepinfra - - name: Pack @llamaindex/portkey-ai - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/portkey-ai - - name: Pack @llamaindex/replicate - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/replicate - - name: Pack @llamaindex/anthropic - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/anthropic - - name: Pack @llamaindex/groq - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/groq - - name: Pack @llamaindex/ollama - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llm/ollama - - name: Pack @llamaindex/core - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/core - - name: Pack @llamaindex/env - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/env - - name: Pack llamaindex - run: pnpm pack --pack-destination ${{ runner.temp }} - working-directory: packages/llamaindex + - name: Pack packages + run: | + for dir in packages/*; do + if [ -d "$dir" ] && [ -f "$dir/package.json" ] && [[ ! "$dir" =~ autotool ]]; then + echo "Packing $dir" + pnpm pack --pack-destination ${{ runner.temp }} -C $dir + else + echo "Skipping $dir, no package.json found" + fi + done + - name: Pack llm packages + run: | + for dir in packages/llm/*; do + if [ -d "$dir" ] && [ -f "$dir/package.json" ]; then + echo "Packing $dir" + pnpm pack --pack-destination ${{ runner.temp }} -C $dir + else + echo "Skipping $dir, no package.json found" + fi + done - name: Install run: npm add ${{ runner.temp }}/*.tgz working-directory: ${{ runner.temp }}/examples