7373 restore-keys : |
7474 pip-${{ matrix.os }}-${{ matrix.python-version }}-v1-
7575
76+ - name : Run the built image
77+ id : run
78+ uses : ./.github/actions/docker-daemon-run
79+ with :
80+ docker-image : lmstudio/llmster-preview:cpu
81+ # Use the same port as the always on API server
82+ port : " 41343:1234"
83+
84+ - name : Download models for tests (Ubuntu only)
85+ if : matrix.os == 'ubuntu-22.04'
86+ run : |
87+ echo "Downloading required models..."
88+
89+ # Download text LLMs
90+ docker exec llmster lms get https://huggingface.co/hugging-quants/Llama-3.2-1B-Instruct-Q4_K_M-GGUF -y
91+ docker exec llmster lms get https://huggingface.co/Qwen/Qwen2.5-7B-Instruct-GGUF -y
92+ docker exec llmster lms get https://huggingface.co/ZiangWu/MobileVLM_V2-1.7B-GGUF -y
93+
94+ # Download vision LLM
95+ docker exec llmster lms get ZiangWu/MobileVLM_V2-1.7B-GGUF -y
96+
97+ # Download additional model for speculative decoding examples
98+ docker exec llmster lms get qwen2.5-0.5b-instruct -y
99+
100+ echo "Model downloads complete"
101+
102+ - name : Load models into LM Studio (Ubuntu only)
103+ if : matrix.os == 'ubuntu-22.04'
104+ run : |
105+ echo "Loading models..."
106+
107+ # Load embedding model
108+ docker exec llmster lms load nomic-embed-text-v1.5 --identifier text-embedding-nomic-embed-text-v1.5 -y
109+
110+ # Load text LLMs
111+ docker exec llmster lms load llama-3.2-1b-instruct --identifier llama-3.2-1b-instruct -y
112+ docker exec llmster lms load qwen2.5-7b-instruct --identifier qwen2.5-7b-instruct-1m -y
113+ docker exec llmster lms load smollm2-135m-instruct --identifier smollm2-135m-instruct -y
114+
115+ # Load vision LLM
116+ docker exec llmster lms load ZiangWu/MobileVLM_V2-1.7B-GGUF --identifier mobilevlm_v2-1.7b
117+
118+ echo "Model loading complete"
119+
76120 - name : Install PDM
77121 run : |
78122 # Ensure `pdm` uses the same version as specified in `pdm.lock`
@@ -92,11 +136,18 @@ jobs:
92136 source "$VIRTUAL_ENV_BIN_DIR/activate"
93137 python -m tox -v -m static
94138
95- - name : CI-compatible tests
139+ - name : CI-compatible tests (Windows)
140+ if : matrix.os == 'windows-2022'
96141 run : |
97142 source "$VIRTUAL_ENV_BIN_DIR/activate"
98143 python -m tox -v -- -m 'not lmstudio'
99144
145+ - name : All tests including LM Studio (Ubuntu)
146+ if : matrix.os == 'ubuntu-22.04'
147+ run : |
148+ source "$VIRTUAL_ENV_BIN_DIR/activate"
149+ python -m tox -v
150+
100151 - name : Upload coverage data
101152 uses : actions/upload-artifact@v4
102153 with :
@@ -105,6 +156,12 @@ jobs:
105156 include-hidden-files : true
106157 if-no-files-found : ignore
107158
159+ - name : Stop LM Studio Docker container (Ubuntu only)
160+ if : matrix.os == 'ubuntu-22.04' && always()
161+ run : |
162+ docker stop llmster || true
163+ docker rm llmster || true
164+
108165 # Coverage check based on https://hynek.me/articles/ditch-codecov-python/
109166 coverage :
110167 name : Combine & check coverage
@@ -143,12 +200,10 @@ jobs:
143200 # Report again and fail if under 50%.
144201 # Highest historical coverage: 65%
145202 # Last noted local test coverage level: 94%
146- # CI coverage percentage is low because many of the tests
147- # aren't CI compatible (they need a local LM Studio instance).
148- # It's only as high as it is because the generated data model
149- # classes make up such a large portion of the total SDK code.
150- # Accept anything over 50% until CI is set up to run LM Studio
151- # in headless mode, and hence is able to run end-to-end tests.
203+ # Ubuntu runners now run LM Studio in Docker, so they achieve higher
204+ # coverage than Windows runners (which skip LM Studio tests).
205+ # The generated data model classes make up a large portion of the SDK code.
206+ # Accept anything over 50% as Windows runners still skip LM Studio tests.
152207 coverage report --fail-under=50
153208
154209 - name : Upload HTML report if check failed
0 commit comments