From 2bdfa19df0173ebe91149522656c8a257760f181 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 21 Jun 2023 22:57:31 +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 8054fe6..b8931e2 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ Mopidy-SoundCloud :target: https://pypi.org/project/Mopidy-SoundCloud/ :alt: Latest PyPI version -.. image:: https://img.shields.io/github/workflow/status/mopidy/mopidy-soundcloud/CI +.. image:: https://img.shields.io/github/actions/workflow/status/mopidy/mopidy-soundcloud/ci.yml?branch=main :target: https://github.com/mopidy/mopidy-soundcloud/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 02e3d5d..934f980 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,9 +14,9 @@ classifiers = License :: OSI Approved :: MIT 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.0.0 Pykka >= 2.0.1 diff --git a/tox.ini b/tox.ini index 0674d64..38b4d3d 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