From 4755582248098151396c88dc7dcb3654502ac784 Mon Sep 17 00:00:00 2001 From: sciencewhiz Date: Mon, 7 Oct 2024 19:09:17 -0700 Subject: [PATCH] Update Actions and python & sphinx matrix Update pytest to work with newer python versions Update supported Python versions to currently supported --- .github/workflows/CI.yml | 40 ++++++++++++++++------------------------ dev-requirements.txt | 7 ++++--- setup.py | 7 ++++--- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d02504f..b8120ab 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,29 +1,21 @@ name: CI -on: - push: - branches: - - main - pull_request: - branches: - - main - create: - tags: - - '*' +on: [pull_request, push] + jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: psf/black@20.8b1 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: psf/black@24.4.2 build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.6 + python-version: 3.9 - name: Install Dependencies run: | python -m pip install --upgrade pip @@ -33,7 +25,7 @@ jobs: python setup.py sdist python setup.py bdist_wheel - name: Upload build artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dist path: dist @@ -43,14 +35,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3'] - sphinx-version: ['2', '3'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9'] + sphinx-version: ['2', '3', '4', '5', '6', '7'] name: "Test - Python(${{ matrix.python-version }}), Sphinx(${{ matrix.sphinx-version }})" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -60,7 +52,7 @@ jobs: pip install -r ./dev-requirements.txt - name: Download build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: dist path: dist @@ -80,12 +72,12 @@ jobs: if: contains(github.ref, 'refs/tags/') && github.repository_owner == 'wpilibsuite' steps: - name: Download build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: dist path: dist - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} diff --git a/dev-requirements.txt b/dev-requirements.txt index 4902b59..fab9407 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,6 @@ sphinx six -pytest==5.4.3 -wheel==0.34.2 -requests==2.25.1 \ No newline at end of file +wheel==0.43.0 +pytest==7.4.4 +requests==2.25.1 +defusedxml \ No newline at end of file diff --git a/setup.py b/setup.py index 17fcb0a..b872ac0 100644 --- a/setup.py +++ b/setup.py @@ -37,10 +37,11 @@ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.6", - "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", + "Programming Language :: Python :: 3.12", "Programming Language :: Python", "Topic :: Documentation :: Sphinx", "Topic :: Documentation", @@ -48,5 +49,5 @@ "Topic :: Text Processing", "Topic :: Utilities", ], - python_requires=">=3.6", + python_requires=">=3.8", )