mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 09:56:28 +00:00 
			
		
		
		
	Setup dedicated CI to run the Ollama tests
This commit is contained in:
		
							
								
								
									
										34
									
								
								.github/workflows/test-suite.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/test-suite.yml
									
									
									
									
										vendored
									
									
								
							@@ -4,7 +4,7 @@ on:
 | 
				
			|||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
  schedule:
 | 
					  schedule:
 | 
				
			||||||
    # Everyday at 5:00am
 | 
					    # Everyday at 5:00am
 | 
				
			||||||
    - cron: '0 5 * * *'
 | 
					    - cron: "0 5 * * *"
 | 
				
			||||||
  pull_request:
 | 
					  pull_request:
 | 
				
			||||||
  push:
 | 
					  push:
 | 
				
			||||||
    # trying and staging branches are for Bors config
 | 
					    # trying and staging branches are for Bors config
 | 
				
			||||||
@@ -89,6 +89,38 @@ jobs:
 | 
				
			|||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          cargo test --workspace --locked --release --features "$(cargo xtask list-features --exclude-feature cuda)"
 | 
					          cargo test --workspace --locked --release --features "$(cargo xtask list-features --exclude-feature cuda)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ollama-ubuntu:
 | 
				
			||||||
 | 
					    name: Test with Ollama
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    env:
 | 
				
			||||||
 | 
					      MEILI_TEST_OLLAMA_SERVER: "http://localhost:11434"
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v1
 | 
				
			||||||
 | 
					      - name: Install Ollama
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          curl -fsSL https://ollama.com/install.sh | sudo -E sh
 | 
				
			||||||
 | 
					      - name: Start serving
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          # Run it in the background, there is no way to daemonise at the moment
 | 
				
			||||||
 | 
					          ollama serve &
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # A short pause is required before the HTTP port is opened
 | 
				
			||||||
 | 
					          sleep 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          # This endpoint blocks until ready
 | 
				
			||||||
 | 
					          time curl -i http://localhost:11434
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Pull nomic-embed-text & all-minilm
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          ollama pull nomic-embed-text
 | 
				
			||||||
 | 
					          ollama pull all-minilm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Run cargo test
 | 
				
			||||||
 | 
					        uses: actions-rs/cargo@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          command: test
 | 
				
			||||||
 | 
					          args: --locked --release --all ollama
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  test-disabled-tokenization:
 | 
					  test-disabled-tokenization:
 | 
				
			||||||
    name: Test disabled tokenization
 | 
					    name: Test disabled tokenization
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user