From ff985a3a5737477dd75ea2ecb9279314b2f117f4 Mon Sep 17 00:00:00 2001 From: Daniel Walker Date: Thu, 31 Aug 2023 13:48:17 -0400 Subject: [PATCH] added tox testing --- .github/workflows/tox.yml | 28 ++++++++++++++++++++++++++++ requirements-dev.txt | 4 +++- tox.ini | 15 +++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tox.yml create mode 100644 tox.ini diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 0000000..95aa7a1 --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,28 @@ +name: Run Tox tests + +on: + - push + - pull_request + +jobs: + build: + runs-on: ${{ matrix.platform }} + strategy: + matrix: + platform: [ubuntu-latest] + python-version: ['3.10', '3.11'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox + env: + PLATFORM: ${{ matrix.platform }} diff --git a/requirements-dev.txt b/requirements-dev.txt index c14637b..5c4110e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,6 @@ black==23.7.0 flake8==6.1.0 flake8-annotations==3.0.1 -mypy==1.4.1 \ No newline at end of file +flake8-warnings==0.4.0 +mypy==1.4.1 +pytest==7.4.0 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..4e180bb --- /dev/null +++ b/tox.ini @@ -0,0 +1,15 @@ +[tox] +isolated_build = true +envlist = py310, py311 + +[gh-actions] +python = + 3.10: py310 + 3.11: py311 + +[testenv] +deps = -rrequirements-dev.txt +commands = + pytest tests + black --check . + mypy . \ No newline at end of file