From 512c5c0d35703e1868202e2285148870a8ea392b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Mon, 30 Nov 2020 14:04:42 +0100 Subject: [PATCH] Add a test_build phase to ensure produced output is working --- .github/workflows/build.yml | 5 +++++ setup.cfg | 3 ++- test_build.py | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test_build.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cbf91f6..dfba48a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,11 @@ jobs: run: | pipenv run pytest --cov=fastapi_users/ pipenv run codecov + - name: Build and install it on system host + run: | + pipenv run flit build + pipenv run flit install --python $(which python) + python test_build.py release: runs-on: ubuntu-latest diff --git a/setup.cfg b/setup.cfg index 2fe3731b..0c38c5fc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,8 @@ ignore = D1 profile = black [tool:pytest] -markers = +addopts = --ignore=test_build.py +markers = authentication db fastapi_users diff --git a/test_build.py b/test_build.py new file mode 100644 index 00000000..6d9751cb --- /dev/null +++ b/test_build.py @@ -0,0 +1,9 @@ +# flake8: noqa +import sys + +try: + from fastapi_users import FastAPIUsers +except: + sys.exit(1) + +sys.exit(0)