diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 1b0086f39c..8d87b6d983 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -49,7 +49,7 @@ jobs: zmq chardet pypdf \ pandas sentence_transformers together \ aiosqlite groq fireworks-ai \ - pytest-asyncio + pytest-asyncio pytest_html # - name: Install Ollama # run: | @@ -69,7 +69,7 @@ jobs: echo "Repository root: ${{ github.workspace }}" echo "Branch: ${{ github.ref }}" echo "List of tests" - pytest ${{ github.workspace }}/llama_stack/providers/tests/ -k "fireworks and together" --config=github_ci_test_config.yaml + pytest ${{ github.workspace }}/llama_stack/providers/tests/ -k "fireworks and together" # - name: Upload pytest test results # uses: actions/upload-artifact@v4 diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index b148d8ac0f..6f8e5ead26 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -204,10 +204,52 @@ jobs: TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }} TAVILY_SEARCH_API_KEY: ${{ secrets.TAVILY_SEARCH_API_KEY }} + steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Install the package + run: | + max_attempts=6 + attempt=1 + while [ $attempt -le $max_attempts ]; do + echo "Attempt $attempt of $max_attempts to install package..." + if pip install --no-cache --index-url https://pypi.org/simple/ --extra-index-url https://test.pypi.org/simple/ llama-stack==${{ needs.trigger-client-and-models-build.outputs.version }}; then + echo "Package installed successfully" + break + fi + if [ $attempt -ge $max_attempts ]; then + echo "Failed to install package after $max_attempts attempts" + exit 1 + fi + attempt=$((attempt + 1)) + sleep 10 + done + - name: Test the package versions + run: | + pip list | grep llama_ + - name: Test CLI commands + run: | + llama model list + llama stack build --list-templates + llama model prompt-format -m Llama3.2-11B-Vision-Instruct + llama stack list-apis + llama stack list-providers inference + llama stack list-providers telemetry + # - name: Test Notebook + # run: | + # pip install pytest nbval + # llama stack build --template together --image-type venv + # pytest -v -s --nbval-lax ./docs/notebooks/Llama_Stack_Building_AI_Applications.ipynb + # pytest -v -s --nbval-lax ./docs/notebooks/Llama_Stack_Benchmark_Evals.ipynb + + - name: Integration tests + # working-directory: "${{ github.workspace }}" + run: | + pip install pytest_html + pytest ./llama_stack/providers/tests/ -k "fireworks and together" + # - name: Install the package # run: | # max_attempts=6 @@ -241,10 +283,3 @@ jobs: # pip install pytest nbval # llama stack build --template together --image-type venv # pytest -v -s --nbval-lax ./docs/notebooks/Llama_Stack_Building_AI_Applications.ipynb - - name: Integration tests - working-directory: "${{ github.workspace }}" - run: | - pip install pytest_html - export FIREWORKS_API_KEY=${{ secrets.FIREWORKS_API_KEY }} - export TOGETHER_API_KEY=${{ secrets.TOGETHER_API_KEY }} - pytest ${{ github.workspace }}/llama_stack/providers/tests/ -k "fireworks and together" --config=github_ci_test_config.yaml