Fix test workflows to use build artifacts instead of local binary

- Build workflow now uploads ollama binary as artifact with 7-day retention
- Test workflows download artifact instead of expecting local binary
- Eliminates 'ollama binary not found' error when running tests
- Enables build-once, test-multiple-times workflow pattern
- Added binary verification step to confirm artifact download
This commit is contained in:
Shang Chieh Tseng
2025-10-30 12:07:28 +08:00
parent 6c3876a30d
commit a171c8a087
3 changed files with 31 additions and 11 deletions

View File

@@ -37,3 +37,15 @@ jobs:
- name: Build Go binary
run: |
go build -v -o ollama .
- name: Verify binary was created
run: |
ls -lh ollama
./ollama --version
- name: Upload ollama binary as artifact
uses: actions/upload-artifact@v4
with:
name: ollama-binary
path: ollama
retention-days: 7