Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sixianyi0721 committed Jan 17, 2025
1 parent 85437e2 commit 92c5027
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
55 changes: 45 additions & 10 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 92c5027

Please sign in to comment.