Merge branch 'master' of github.com:HumanoidSandvichDispenser/availabili.tf
						commit
						25f8da7010
					
				| 
						 | 
					@ -0,0 +1,36 @@
 | 
				
			||||||
 | 
					name: Test Python backend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ "master" ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    branches: [ "master" ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  test:
 | 
				
			||||||
 | 
					    runs-on: ${{ matrix.os }} 
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        os: [ubuntu-latest]
 | 
				
			||||||
 | 
					    defaults:
 | 
				
			||||||
 | 
					      run:
 | 
				
			||||||
 | 
					        working-directory: ./backend-flask
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					    - name: Set up Python 3.10
 | 
				
			||||||
 | 
					      uses: actions/setup-python@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: "3.x"
 | 
				
			||||||
 | 
					    - name: Install dependencies
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        python -m pip install --upgrade pip
 | 
				
			||||||
 | 
					        pip install -r requirements.txt
 | 
				
			||||||
 | 
					    - name: Test with pytest including coverage
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        pytest --cov
 | 
				
			||||||
 | 
					    - name: Fail if coverage is less than 75%
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					        coverage report --fail-under=75
 | 
				
			||||||
		Loading…
	
		Reference in New Issue