Workflow trigger #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server test scenario | |
name: Server Integration Tests | |
on: [push, pull_request] | |
jobs: | |
ubuntu-latest-cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v3 | |
- name: Dependencies | |
id: depends | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential | |
- name: Build | |
id: cmake_build | |
run: | | |
mkdir build | |
cd build | |
cmake | |
cmake --build . --config Release -j $(nproc) | |
- name: Tests dependencies | |
id: test_dependencies | |
run: | | |
pip install -r examples/server/tests/requirements.txt | |
- name: Download test model | |
id: download_model | |
run: | | |
./scripts/hf.sh --repo TheBloke/phi-2-GGUF --file phi-2.Q4_K_M.gguf | |
- name: Server Integration Tests | |
id: server_integration_test | |
run: | | |
./build/bin/server \ | |
-m phi-2.Q4_K_M.gguf \ | |
--ctx-size 2048 \ | |
--parallel 4 \ | |
--n-predict 2048 \ | |
--batch-size 512 \ | |
--threads-batch 512 \ | |
--alias phi-2 \ | |
--embedding \ | |
--cont-batching & | |
sh -c '\ | |
max_attempts=10; \ | |
attempts=${max_attempts}; \ | |
echo "waiting for server to be ready..."; \ | |
until curl --silent --show-error --fail "http://localhost:8080/health" | jq -r '.status' | grep ok; do \ | |
attempts=$(( attempts - 1)); \ | |
[ "${attempts}" -eq 0 ] && { echo "Server did not startup" >&2; exit 1; }; \ | |
sleep $(( (max_attempts - attempts) * 2 )); \ | |
done;' | |
cd examples/server/tests | |
behave | |