Create tests.yml

master
HumanoidSandvichDispenser 2025-05-06 10:36:21 -07:00 committed by GitHub
parent 3f15a89d57
commit 498195d86b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 34 additions and 0 deletions

34
.github/workflows/tests.yml vendored 100644
View File

@ -0,0 +1,34 @@
name: Test Python backend
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
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