From 56863fb7d7dff220f732492cf69ec5dc80dcc044 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 13 Oct 2022 11:51:12 +0100 Subject: [PATCH] Add tox file This is the defacto way to run unit tests for most Python projects. The tox-poetry extension is used to provide integration with poetry. Signed-off-by: Stephen Finucane --- .github/workflows/python-test.yml | 2 +- tox.ini | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tox.ini diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 2f7743da..f6cea286 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get full Python version id: full-python-version run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..23a01665 --- /dev/null +++ b/tox.ini @@ -0,0 +1,7 @@ +[tox] +minversion = 3.18.0 +requires = tox-poetry + +[testenv] +commands = + pytest {posargs:tests/}