diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 42e170a28..d6feaec69 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - test: + test-llama-stack-as-library: runs-on: ubuntu-latest env: TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} @@ -37,6 +37,24 @@ jobs: - name: Run client-sdk test working-directory: "${{ github.workspace }}" + env: + REPORT_OUTPUT: md_report.md + shell: bash run: | + pip install --upgrade pytest-md-report + echo "REPORT_FILE=${REPORT_OUTPUT}" >> "$GITHUB_ENV" + export INFERENCE_MODEL=meta-llama/Llama-3.1-8B-Instruct - LLAMA_STACK_CONFIG=./llama_stack/templates/${{ matrix.provider }}/run.yaml pytest ./tests/client-sdk/inference/test_inference.py + LLAMA_STACK_CONFIG=./llama_stack/templates/${{ matrix.provider }}/run.yaml pytest --md-report --md-report-verbose=1 ./tests/client-sdk/inference/test_inference.py --md-report-output "$REPORT_OUTPUT" + + - name: Output reports to the job summary + if: always() + shell: bash + run: | + if [ -f "$REPORT_FILE" ]; then + echo "
Test Report for ${{ matrix.provider }} " >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + cat "$REPORT_FILE" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "
" >> $GITHUB_STEP_SUMMARY + fi