From db5d58e49c669ae6751b07355a0ab99958a6187b Mon Sep 17 00:00:00 2001 From: Philipp Grathwohl Date: Sun, 20 Feb 2022 11:07:13 +0000 Subject: [PATCH] Run tests automatically in build --- .github/workflows/build.yml | 7 +++++-- .gitignore | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c874afc..6585770 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,8 +27,11 @@ jobs: - name: Clean run: python setup.py clean --all -# - name: Run tests -# run: python -m unittest tests + - name: Install Requirements + run: pip3 install -r requirements.txt + + - name: Run tests + run: coverage run --source cbpi -m pytest tests - name: Build source distribution package for CraftBeerPi run: python setup.py sdist diff --git a/.gitignore b/.gitignore index cd36875..6349f01 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ node_modules .venv* .DS_Store config/* -logs/ \ No newline at end of file +logs/ +.coverage \ No newline at end of file