mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-04 02:20:50 +01:00 
			
		
		
		
	- Replaced Maven commands with Makefile targets for running unit and integration tests in the GitHub Actions workflow. - Updated the commands to `make unit-tests` and `make integration-tests-basic` for improved consistency and maintainability.
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Run Tests
 | 
						|
 | 
						|
on:
 | 
						|
  #  push:
 | 
						|
  #    branches:
 | 
						|
  #      - main
 | 
						|
 | 
						|
  workflow_call:
 | 
						|
    inputs:
 | 
						|
      branch:
 | 
						|
        description: 'Branch name to run the tests on'
 | 
						|
        required: true
 | 
						|
        default: 'main'
 | 
						|
        type: string
 | 
						|
 | 
						|
  workflow_dispatch:
 | 
						|
    inputs:
 | 
						|
      branch:
 | 
						|
        description: 'Branch name to run the tests on'
 | 
						|
        required: true
 | 
						|
        default: 'main'
 | 
						|
        type: string
 | 
						|
 | 
						|
jobs:
 | 
						|
  run-tests:
 | 
						|
    name: Unit and Integration Tests
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
 | 
						|
    steps:
 | 
						|
      - name: Checkout target branch
 | 
						|
        uses: actions/checkout@v5
 | 
						|
        with:
 | 
						|
          ref: ${{ github.event.inputs.branch }}
 | 
						|
 | 
						|
      - name: Set up Ollama
 | 
						|
        run: |
 | 
						|
          curl -fsSL https://ollama.com/install.sh | sh
 | 
						|
 | 
						|
      - name: Set up JDK 21
 | 
						|
        uses: actions/setup-java@v5
 | 
						|
        with:
 | 
						|
          java-version: '21'
 | 
						|
          distribution: 'oracle'
 | 
						|
          server-id: github
 | 
						|
          settings-path: ${{ github.workspace }}
 | 
						|
 | 
						|
      - name: Run unit tests
 | 
						|
        run: make unit-tests
 | 
						|
 | 
						|
      - name: Run integration tests
 | 
						|
        run: make integration-tests-basic
 | 
						|
        env:
 | 
						|
          USE_EXTERNAL_OLLAMA_HOST: "true"
 | 
						|
          OLLAMA_HOST: "http://localhost:11434" |