[add] github actions
This commit is contained in:
		
							parent
							
								
									4ed7aaec66
								
							
						
					
					
						commit
						082db21db2
					
				
					 1 changed files with 57 additions and 0 deletions
				
			
		
							
								
								
									
										57
									
								
								.github/workflows/ci-basex.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								.github/workflows/ci-basex.yaml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,57 @@
 | 
				
			||||||
 | 
					name: Run BaseX Tests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  workflow_dispatch: # Enables manual trigger
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - main
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - '.gitea/workflows/trigger/release'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					 test:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Set up Java
 | 
				
			||||||
 | 
					      uses: actions/setup-java@v4
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        distribution: 'temurin'
 | 
				
			||||||
 | 
					        java-version: '17'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Download BaseX
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        BASEX_VERSION="10.7"  # Example version (adjust as needed)
 | 
				
			||||||
 | 
					        # Remove dots from version for filename (e.g., "11.7" → "117") "9.7.4","10.7"
 | 
				
			||||||
 | 
					        BASEX_CLEAN_VERSION="${BASEX_VERSION//./}"
 | 
				
			||||||
 | 
					        wget https://files.basex.org/releases/$BASEX_VERSION/BaseX$BASEX_CLEAN_VERSION.zip -O BaseX.zip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Unzip BaseX
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        unzip BaseX.zip -d $HOME      
 | 
				
			||||||
 | 
					        rm BaseX.zip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Add BaseX to PATH
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV 
 | 
				
			||||||
 | 
					        echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Verify BaseX installation
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        basex -c "SHOW OPTIONS"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Checkout repository
 | 
				
			||||||
 | 
					      uses: actions/checkout@v4
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        ref: main
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    - name: Build package
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        basex scripts/make-xar.xq
 | 
				
			||||||
 | 
					        basex scripts/repo-install.xq
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					    - name: Run tests
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        basex -Wt src/test
 | 
				
			||||||
 | 
					       
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue