66 pull_request :
77 branches : [ main ]
88 paths :
9- - ' distributions/**'
109 - ' llama_stack/**'
1110 - ' tests/integration/**'
1211 - ' uv.lock'
@@ -25,47 +24,33 @@ jobs:
2524 matrix :
2625 # Listing tests manually since some of them currently fail
2726 # TODO: generate matrix list from tests/integration when fixed
28- test-type : [agents, inference, datasets, inspect, scoring, post_training, providers]
27+ test-type : [agents, inference, datasets, inspect, scoring, post_training, providers, tool_runtime ]
2928 client-type : [library, http]
29+ python-version : ["3.10", "3.11", "3.12"]
3030 fail-fast : false # we want to run all tests regardless of failure
3131
3232 steps :
3333 - name : Checkout repository
3434 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3535
36- - name : Install uv
37- uses : astral-sh/ setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
36+ - name : Install dependencies
37+ uses : ./.github/actions/ setup-runner
3838 with :
39- python-version : " 3.10 "
39+ python-version : ${{ matrix.python-version }}
4040
41- - name : Install and start Ollama
42- run : |
43- # the ollama installer also starts the ollama service
44- curl -fsSL https://ollama.com/install.sh | sh
45-
46- - name : Pull Ollama image
47- run : |
48- # TODO: cache the model. OLLAMA_MODELS defaults to ~ollama/.ollama/models.
49- ollama pull llama3.2:3b-instruct-fp16
41+ - name : Setup ollama
42+ uses : ./.github/actions/setup-ollama
5043
51- - name : Set Up Environment and Install Dependencies
44+ - name : Build Llama Stack
5245 run : |
53- uv sync --extra dev --extra test
54- uv pip install ollama faiss-cpu
55- # always test against the latest version of the client
56- # TODO: this is not necessarily a good idea. we need to test against both published and latest
57- # to find out backwards compatibility issues.
58- uv pip install git+https://github.com/meta-llama/llama-stack-client-python.git@main
59- uv pip install -e .
60- llama stack build --template ollama --image-type venv
46+ uv run llama stack build --template ollama --image-type venv
6147
6248 - name : Start Llama Stack server in background
6349 if : matrix.client-type == 'http'
6450 env :
6551 INFERENCE_MODEL : " meta-llama/Llama-3.2-3B-Instruct"
6652 run : |
67- source .venv/bin/activate
68- nohup uv run llama stack run ./llama_stack/templates/ollama/run.yaml --image-type venv > server.log 2>&1 &
53+ LLAMA_STACK_LOG_FILE=server.log nohup uv run llama stack run ./llama_stack/templates/ollama/run.yaml --image-type venv --env OLLAMA_URL="http://0.0.0.0:11434" &
6954
7055 - name : Wait for Llama Stack server to be ready
7156 if : matrix.client-type == 'http'
@@ -93,16 +78,43 @@ jobs:
9378 exit 1
9479 fi
9580
81+ - name : Check Storage and Memory Available Before Tests
82+ if : ${{ always() }}
83+ run : |
84+ free -h
85+ df -h
86+
9687 - name : Run Integration Tests
9788 env :
9889 INFERENCE_MODEL : " meta-llama/Llama-3.2-3B-Instruct"
90+ OLLAMA_URL : " http://0.0.0.0:11434"
9991 run : |
10092 if [ "${{ matrix.client-type }}" == "library" ]; then
10193 stack_config="ollama"
10294 else
10395 stack_config="http://localhost:8321"
10496 fi
105- uv run pytest -v tests/integration/${{ matrix.test-type }} --stack-config=${stack_config} \
97+ uv run pytest -s - v tests/integration/${{ matrix.test-type }} --stack-config=${stack_config} \
10698 -k "not(builtin_tool or safety_with_image or code_interpreter or test_rag)" \
10799 --text-model="meta-llama/Llama-3.2-3B-Instruct" \
108100 --embedding-model=all-MiniLM-L6-v2
101+
102+ - name : Check Storage and Memory Available After Tests
103+ if : ${{ always() }}
104+ run : |
105+ free -h
106+ df -h
107+
108+ - name : Write ollama logs to file
109+ if : ${{ always() }}
110+ run : |
111+ sudo docker logs ollama > ollama.log
112+
113+ - name : Upload all logs to artifacts
114+ if : ${{ always() }}
115+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
116+ with :
117+ name : logs-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.client-type }}-${{ matrix.test-type }}-${{ matrix.python-version }}
118+ path : |
119+ *.log
120+ retention-days : 1
0 commit comments