From 498195d86b8f908ba26df83c53be5a87c612d364 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser <25856867+HumanoidSandvichDispenser@users.noreply.github.com> Date: Tue, 6 May 2025 10:36:21 -0700 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..89e9cd9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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