diff --git a/.github/workflows/tox_check.yaml b/.github/workflows/tox_check.yaml new file mode 100644 index 0000000..aa6b96c --- /dev/null +++ b/.github/workflows/tox_check.yaml @@ -0,0 +1,42 @@ +name: tox_check +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + test: + name: tox test with ${{ matrix.env }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + env: + - "3.13" + - "3.12" + - "3.11" + - "3.10" + os: + - ubuntu-latest + - macos-latest + - windows-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.env }} + - name: Run image + uses: abatilo/actions-poetry@v3 + with: + poetry-version: "main" + - name: Install tox + run: poetry add --group=dev tox + - name: Select Python version + run: poetry env use ${{ matrix.env }} + - name: Install packages + run: poetry install + - name: Run test suite + run: poetry run tox run + env: + TOX_GH_MAJOR_MINOR: ${{ matrix.env }} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index eedab3c..2dbdaef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" requests = "^2.22.0" [build-system] @@ -28,4 +28,5 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.group.dev.dependencies] pytest = "*" -pytest-mock = "*" \ No newline at end of file +pytest-mock = "*" +tox = "^4.31.0" diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b9db2fa --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +[tox] +requires = + tox>=4 +env_list = + py31{0,1,2,3} + +[testenv] +description = run the tests with pytest +package = wheel +wheel_build_env = .pkg +deps = + pytest>=6 + pytest-mock>=3.15.1 +commands = + pytest {tty:--color=yes} {posargs} + +[gh] +python = + 3.13 = 3.13 + 3.12 = 3.12 + 3.11 = 3.11 + 3.10 = 3.10