From 0b3d8ac441406807c22509d81377b275c37b8e10 Mon Sep 17 00:00:00 2001 From: yukisato Date: Fri, 24 Jul 2026 00:50:44 +0900 Subject: [PATCH] Update supported Python versions in docs/CI after #35 - README/README-ja: Python 3.6+ -> 3.8+ (matches python_requires) - tox.ini: envlist py36/py37 -> py38-py310 (asynctest breaks on 3.11+) - Remove stale Travis CI config (service no longer runs for this repo) - Add GitHub Actions: full test suite on 3.8-3.10, import smoke test on 3.11-3.13 --- .github/workflows/test.yml | 45 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ---------- README-ja.md | 2 +- README.md | 2 +- tox.ini | 5 ++++- 5 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..674b070 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,45 @@ +name: test + +on: + push: + branches: [master] + pull_request: + +jobs: + # Full test suite. asynctest does not work on Python 3.11+ + # (asyncio.coroutine was removed), so tests run on 3.8-3.10 only. + test: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install package and test dependencies + run: | + pip install . + pip install asynctest pytest pytest-mock pyyaml jsonschema + - name: Run tests + run: pytest -vv + + # Import smoke test on newer Pythons where the test suite cannot run. + import-check: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install package + run: pip install . + - name: Import check + working-directory: ${{ runner.temp }} + run: python -c "from obniz import Obniz; print('import OK')" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ef995f6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -dist: xenial -language: python -python: -- "3.6" -- "3.7" - -install: - - pip install pipenv - - pipenv install --deploy --dev - -script: - - pipenv run pytest diff --git a/README-ja.md b/README-ja.md index 934c4aa..d1b658b 100644 --- a/README-ja.md +++ b/README-ja.md @@ -5,7 +5,7 @@ [obniz](https://obniz.io/)をpythonから操作するためのsdkです。 [obnizBoard](https://obniz.io/ja/doc/obniz_board_hobby_90/hw_overview)と[obnizOS](https://obniz.io/ja/doc/obnizos/os_overview)に対応しています -**Python 3.6以上**で動作します。 +**Python 3.8以上**で動作します。 diff --git a/README.md b/README.md index acb453a..496001c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Control obniz from python. This sdk works with [obniz api](https://obniz.io/doc/about_obniz_api). -Compatible with **Python 3.6+**. +Compatible with **Python 3.8+**. diff --git a/tox.ini b/tox.ini index 5647803..9a890bb 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,11 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. +# Note: the test suite depends on asynctest, which does not work on +# Python 3.11+ (asyncio.coroutine was removed). Runtime supports 3.8+, +# but tests can only run on 3.8-3.10 until asynctest is replaced. [tox] -envlist = py36, py37 +envlist = py38, py39, py310 [testenv] deps =