implement basic testing fixtures and linting
This commit is contained in:
		
							
								
								
									
										27
									
								
								.gitea/workflows/backend_run-lint.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.gitea/workflows/backend_run-lint.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| on: | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - backend/** | ||||
|  | ||||
| name: Run linting on the backend code | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Build | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|  | ||||
|     - uses: https://gitea.com/actions/checkout@v4 | ||||
|  | ||||
|     - name: Install dependencies | ||||
|       run: | | ||||
|         apt-get update && apt-get install -y python3 python3-pip | ||||
|         # only install dev-packages | ||||
|         pipenv install --categories=dev-packages | ||||
|       working-directory: backend | ||||
|  | ||||
|     - name: Run linter | ||||
|       run: pipenv run pylint src | ||||
|       working-directory: backend | ||||
							
								
								
									
										27
									
								
								.gitea/workflows/backend_run-test.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.gitea/workflows/backend_run-test.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| on: | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - main | ||||
|     paths: | ||||
|       - backend/** | ||||
|  | ||||
| name: Run linting on the backend code | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     name: Build | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|  | ||||
|     - uses: https://gitea.com/actions/checkout@v4 | ||||
|  | ||||
|     - name: Install dependencies | ||||
|       run: | | ||||
|         apt-get update && apt-get install -y python3 python3-pip | ||||
|         # install all packages, including dev-packages | ||||
|         pipenv install --dev | ||||
|       working-directory: backend | ||||
|  | ||||
|     - name: Run linter | ||||
|       run: pipenv run pytest src | ||||
|       working-directory: backend | ||||
		Reference in New Issue
	
	Block a user