mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-19 20:27: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:
31
tests/testcases/build/TC-BUILD-001.yml
Normal file
31
tests/testcases/build/TC-BUILD-001.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
id: TC-BUILD-001
|
||||
name: Builder Image Verification
|
||||
suite: build
|
||||
priority: 1
|
||||
timeout: 120000
|
||||
|
||||
dependencies: []
|
||||
|
||||
steps:
|
||||
- name: Check image exists
|
||||
command: docker images ollama37-builder:latest --format '{{.Repository}}:{{.Tag}}'
|
||||
|
||||
- name: Verify CUDA toolkit
|
||||
command: docker run --rm ollama37-builder:latest nvcc --version
|
||||
|
||||
- name: Verify GCC version
|
||||
command: docker run --rm ollama37-builder:latest gcc --version | head -1
|
||||
|
||||
- name: Verify Go version
|
||||
command: docker run --rm ollama37-builder:latest go version
|
||||
|
||||
criteria: |
|
||||
All commands should succeed (exit code 0).
|
||||
|
||||
Expected outputs:
|
||||
- Image exists: should show "ollama37-builder:latest"
|
||||
- CUDA: should show version 11.4 (accept 11.4.x)
|
||||
- GCC: should show version 10 (accept GCC 10.x)
|
||||
- Go: should show version 1.25 or higher
|
||||
|
||||
Accept minor version variations. Focus on major versions being correct.
|
||||
27
tests/testcases/build/TC-BUILD-002.yml
Normal file
27
tests/testcases/build/TC-BUILD-002.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
id: TC-BUILD-002
|
||||
name: Runtime Image Build
|
||||
suite: build
|
||||
priority: 2
|
||||
timeout: 900000
|
||||
|
||||
dependencies:
|
||||
- TC-BUILD-001
|
||||
|
||||
steps:
|
||||
- name: Build runtime image
|
||||
command: cd docker && make build-runtime-no-cache 2>&1 | tail -50
|
||||
timeout: 900000
|
||||
|
||||
- name: Verify runtime image exists
|
||||
command: docker images ollama37:latest --format '{{.Repository}}:{{.Tag}} {{.Size}}'
|
||||
|
||||
criteria: |
|
||||
The runtime Docker image should build successfully from GitHub source.
|
||||
|
||||
Expected:
|
||||
- Build completes without fatal errors
|
||||
- Final output should mention "successfully" or similar completion message
|
||||
- Runtime image "ollama37:latest" should exist after build
|
||||
- Image size should be substantial (>10GB is expected due to CUDA)
|
||||
|
||||
Accept build warnings. Only fail on actual build errors.
|
||||
25
tests/testcases/build/TC-BUILD-003.yml
Normal file
25
tests/testcases/build/TC-BUILD-003.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
id: TC-BUILD-003
|
||||
name: Image Size Validation
|
||||
suite: build
|
||||
priority: 3
|
||||
timeout: 30000
|
||||
|
||||
dependencies:
|
||||
- TC-BUILD-002
|
||||
|
||||
steps:
|
||||
- name: Check builder image size
|
||||
command: docker images ollama37-builder:latest --format '{{.Size}}'
|
||||
|
||||
- name: Check runtime image size
|
||||
command: docker images ollama37:latest --format '{{.Size}}'
|
||||
|
||||
criteria: |
|
||||
Docker images should be within expected size ranges.
|
||||
|
||||
Expected:
|
||||
- Builder image: 10GB to 20GB (contains CUDA, GCC, CMake, Go)
|
||||
- Runtime image: 15GB to 25GB (contains builder + compiled ollama)
|
||||
|
||||
These are large images due to CUDA toolkit and build tools.
|
||||
Accept sizes within reasonable range of expectations.
|
||||
Reference in New Issue
Block a user