Build and push the backend on pr and merge
This commit is contained in:
		
							
								
								
									
										31
									
								
								.gitea/workflows/backend.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								.gitea/workflows/backend.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					name: Build and test backend 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ master ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    branches: [ master ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  Build-backend:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					    - uses: actions/setup-java@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        java-version: '21'
 | 
				
			||||||
 | 
					        distribution: 'temurin'
 | 
				
			||||||
 | 
					    - uses: gradle/gradle-build-action@v3
 | 
				
			||||||
 | 
					    - name: building
 | 
				
			||||||
 | 
					      run: ./gradlew backend:build
 | 
				
			||||||
 | 
					  Test-backend:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					    - uses: actions/setup-java@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        java-version: '21'
 | 
				
			||||||
 | 
					        distribution: 'temurin'
 | 
				
			||||||
 | 
					    - uses: gradle/gradle-build-action@v3
 | 
				
			||||||
 | 
					    - name: building
 | 
				
			||||||
 | 
					      run: ./gradlew backend:test 
 | 
				
			||||||
@ -7,7 +7,7 @@ on:
 | 
				
			|||||||
    branches: [ master ]
 | 
					    branches: [ master ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  Build:
 | 
					  Build-frontend:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v4
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
@ -20,7 +20,7 @@ jobs:
 | 
				
			|||||||
    - run: npm run build --if-present
 | 
					    - run: npm run build --if-present
 | 
				
			||||||
      name: build
 | 
					      name: build
 | 
				
			||||||
      working-directory: ./frontend
 | 
					      working-directory: ./frontend
 | 
				
			||||||
  Test:
 | 
					  Test-frontend:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v4
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
		Reference in New Issue
	
	Block a user