From 47425e55265eb90366dc1f7a5f82fedf0fa2c591 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 21 Jun 2023 23:03:48 +0200 Subject: [PATCH] Require Python 3.9+ and fix CI --- .github/workflows/ci.yml | 41 ++++++++++++++++++++-------------------- README.rst | 2 +- pyproject.toml | 2 +- setup.cfg | 6 +++--- tox.ini | 2 +- 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a71c8e2..8f22746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + pull_request: + push: + branches: + - main jobs: main: @@ -8,45 +12,40 @@ jobs: fail-fast: false matrix: include: - - name: "Test: Python 3.7" - python: "3.7" - tox: py37 - - name: "Test: Python 3.8" - python: "3.8" - tox: py38 - name: "Test: Python 3.9" python: "3.9" tox: py39 + - name: "Test: Python 3.10" + python: "3.10" + tox: py310 + - name: "Test: Python 3.11" + python: "3.11" + tox: py311 coverage: true - name: "Lint: check-manifest" - python: "3.9" + python: "3.11" tox: check-manifest - name: "Lint: flake8" - python: "3.9" + python: "3.11" tox: flake8 name: ${{ matrix.name }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: ghcr.io/mopidy/ci:latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} + - uses: actions/checkout@v3 - name: Fix home dir permissions to enable pip caching run: chown -R root /github/home - - name: Cache pip - uses: actions/cache@v2 + - uses: actions/setup-python@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-${{ hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip- + python-version: ${{ matrix.python }} + cache: pip + cache-dependency-path: setup.cfg - run: python -m pip install pygobject tox - run: python -m tox -e ${{ matrix.tox }} if: ${{ ! matrix.coverage }} - run: python -m tox -e ${{ matrix.tox }} -- --cov-report=xml if: ${{ matrix.coverage }} - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 if: ${{ matrix.coverage }} diff --git a/README.rst b/README.rst index 93cffec..24827ea 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Mopidy-MPD :target: https://pypi.org/project/Mopidy-MPD/ :alt: Latest PyPI version -.. image:: https://img.shields.io/github/workflow/status/mopidy/mopidy-mpd/CI +.. image:: https://img.shields.io/github/actions/workflow/status/mopidy/mopidy-mpd/ci.yml?branch=main :target: https://github.com/mopidy/mopidy-mpd/actions :alt: CI build status diff --git a/pyproject.toml b/pyproject.toml index bff16e0..04a6524 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools >= 30.3.0", "wheel"] [tool.black] -target-version = ["py37", "py38"] +target-version = ["py39", "py310", "py311"] line-length = 80 diff --git a/setup.cfg b/setup.cfg index 9c26858..05b6f3e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,9 +14,9 @@ classifiers = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Multimedia :: Sound/Audio :: Players @@ -24,7 +24,7 @@ classifiers = zip_safe = False include_package_data = True packages = find: -python_requires = >= 3.7 +python_requires = >= 3.9 install_requires = Mopidy >= 3.3.0 Pykka >= 2.0.1 diff --git a/tox.ini b/tox.ini index 38ae436..e6a3663 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37, py38, py39, check-manifest, flake8 +envlist = py39, py310, py311, check-manifest, flake8 [testenv] sitepackages = true