11---
2- name : Run examples
2+ name : Run examples (Jing)
33
44on : [push, pull_request]
55
@@ -16,48 +16,48 @@ jobs:
1616
1717 steps :
1818
19- # # Free up some disk space
20- # - name: Remove unnecessary files
21- # run: |
22- # sudo rm -rf /usr/share/dotnet
23- # sudo rm -rf "$AGENT_TOOLSDIRECTORY"
19+ # Free up some disk space
20+ - name : Remove unnecessary files
21+ run : |
22+ sudo rm -rf /usr/share/dotnet
23+ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
2424
25- # # Set up Ollama
26- # - name: Install Ollama and start server
27- # shell: bash
28- # run: |
29- # curl -fsSL https://ollama.com/install.sh | sudo -E sh
25+ # Set up Ollama
26+ - name : Install Ollama and start server
27+ shell : bash
28+ run : |
29+ curl -fsSL https://ollama.com/install.sh | sudo -E sh
3030
31- # - name: Pull models in examples/
32- # shell: bash
33- # run: |
34- # ollama pull granite3.2:2b
35- # ollama pull mxbai-embed-large
36- # ollama list
31+ - name : Pull models in examples/
32+ shell : bash
33+ run : |
34+ ollama pull granite3.2:2b
35+ ollama pull mxbai-embed-large
36+ ollama list
3737
38- # - name: Check that all required models are available
39- # shell: bash
40- # run: |
41- # models=("mxbai-embed-large" "granite3.2:2b")
42- # missing=0
43- # for model in "${models[@]}"; do
44- # if ! ollama list | awk 'NR>1 {print $1}' | grep -q "$model"; then
45- # echo "❌ Model $model (or substring) is missing!"
46- # missing=1
47- # fi
48- # done
38+ - name : Check that all required models are available
39+ shell : bash
40+ run : |
41+ models=("mxbai-embed-large" "granite3.2:2b")
42+ missing=0
43+ for model in "${models[@]}"; do
44+ if ! ollama list | awk 'NR>1 {print $1}' | grep -q "$model"; then
45+ echo "❌ Model $model (or substring) is missing!"
46+ missing=1
47+ fi
48+ done
4949
50- # if [ "$missing" -eq 1 ]; then
51- # exit 1
52- # else
53- # echo "✅ All expected models are available."
54- # fi
50+ if [ "$missing" -eq 1 ]; then
51+ exit 1
52+ else
53+ echo "✅ All expected models are available."
54+ fi
5555
56- # - name: Wait for Ollama server
57- # shell: bash
58- # run: |
59- # sleep 10
60- # time curl -i http://localhost:11434
56+ - name : Wait for Ollama server
57+ shell : bash
58+ run : |
59+ sleep 10
60+ time curl -i http://localhost:11434
6161
6262 # Run tests
6363 - uses : actions/checkout@v4
9090 WATSONX_URL : ${{ secrets.WATSONX_URL }}
9191 REPLICATE_API_TOKEN : ${{ secrets.REPLICATE_API_TOKEN }}
9292 OLLAMA_GHACTIONS_RESULTS : true
93- run : python env_test .py
93+ run : py.test -v --capture=tee-sys -rfE -s tests/test_examples_run .py
0 commit comments