mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-22 05:37:01 +00:00
Add GitHub Actions CI/CD pipeline and test framework
- Add .github/workflows/build-test.yml for automated testing - Add tests/ directory with TypeScript test runner - Add docs/CICD.md documentation - Remove .gitlab-ci.yml (migrated to GitHub Actions) - Update .gitignore for test artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
39
tests/testcases/runtime/TC-RUNTIME-003.yml
Normal file
39
tests/testcases/runtime/TC-RUNTIME-003.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
id: TC-RUNTIME-003
|
||||
name: Health Check
|
||||
suite: runtime
|
||||
priority: 3
|
||||
timeout: 180000
|
||||
|
||||
dependencies:
|
||||
- TC-RUNTIME-001
|
||||
|
||||
steps:
|
||||
- name: Wait for health check
|
||||
command: |
|
||||
for i in {1..30}; do
|
||||
STATUS=$(docker inspect ollama37 --format='{{.State.Health.Status}}' 2>/dev/null || echo "starting")
|
||||
echo "Health status: $STATUS (attempt $i/30)"
|
||||
if [ "$STATUS" = "healthy" ]; then
|
||||
echo "Container is healthy"
|
||||
exit 0
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
echo "Health check timeout"
|
||||
exit 1
|
||||
|
||||
- name: Test API endpoint
|
||||
command: curl -s http://localhost:11434/api/tags
|
||||
|
||||
- name: Check Ollama version
|
||||
command: docker exec ollama37 ollama --version
|
||||
|
||||
criteria: |
|
||||
Ollama server should be healthy and API responsive.
|
||||
|
||||
Expected:
|
||||
- Container health status becomes "healthy"
|
||||
- /api/tags endpoint returns JSON response (even if empty models)
|
||||
- ollama --version shows version information
|
||||
|
||||
Accept any valid JSON response from API. Version format may vary.
|
||||
Reference in New Issue
Block a user