forked from Mirror/ollama4j
		
	 ee0493eb57
			
		
	
	ee0493eb57
	
	
	
		
			
			Renamed the PR-related workflow for clarity and replaced `build-on-pr-create.yml` with `build-and-test-on-pr-open.yml` for better naming consistency. Also commented out the push trigger in `run-tests.yml` to refine its activation criteria.
		
			
				
	
	
		
			35 lines
		
	
	
		
			761 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			761 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Run Unit and Integration Tests
 | |
| 
 | |
| on:
 | |
| #  push:
 | |
| #    branches:
 | |
| #      - main
 | |
|   workflow_dispatch:
 | |
|     inputs:
 | |
|       branch:
 | |
|         description: 'Branch name to run the tests on'
 | |
|         required: true
 | |
|         default: 'main'
 | |
| 
 | |
| jobs:
 | |
|   run-tests:
 | |
|     runs-on: ubuntu-latest
 | |
| 
 | |
|     steps:
 | |
|       - uses: actions/checkout@v3
 | |
|         with:
 | |
|           ref: ${{ github.event.inputs.branch }}
 | |
| 
 | |
|       - name: Set up JDK 17
 | |
|         uses: actions/setup-java@v3
 | |
|         with:
 | |
|           java-version: '17'
 | |
|           distribution: 'temurin'
 | |
|           server-id: github
 | |
|           settings-path: ${{ github.workspace }}
 | |
| 
 | |
|       - name: Run unit tests
 | |
|         run: mvn clean test -Punit-tests
 | |
| 
 | |
|       - name: Run integration tests
 | |
|         run: mvn clean verify -Pintegration-tests |