From 353f25ad3c90b9b2ea5247554cd7e6357d20d1a1 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 17:38:13 -0400 Subject: [PATCH 01/24] add github actions workflow --- .github/workflows/main.yml | 84 ++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- setup.py | 12 +++--- 3 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..615b7c7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,84 @@ +# Adapted from https://github.com/python-attrs/attrs/blob/main/.github/workflows/main.yml +--- +name: CI + +on: + push: + branches: ["master"] + tags: + - "*" + pull_request: + branches: ["master"] + workflow_dispatch: + +jobs: + tests: + name: "Python ${{ matrix.python-version }}" + runs-on: "ubuntu-latest" + env: + USING_COVERAGE: "3.12" + + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" + run: | + set -xe + python -VV + python -m site + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions + - name: "Run tox targets for ${{ matrix.python-version }}" + run: "python -m tox" + + # We always use a modern Python version for combining coverage to prevent + # parsing errors in older versions for modern code. + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + + - name: "Combine coverage" + run: | + set -xe + python -m coverage xml + if: "contains(env.USING_COVERAGE, matrix.python-version)" + - name: "Upload coverage to Codecov" + if: "contains(env.USING_COVERAGE, matrix.python-version)" + uses: "codecov/codecov-action@v4" + with: + fail_ci_if_error: true + + package: + name: "Build, verify, and publish package" + runs-on: "ubuntu-latest" + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + + - name: "Install build, check-wheel-content, and twine" + run: "python -m pip install build twine check-wheel-contents" + - name: "Build package" + run: "python -m build --sdist --wheel ." + - name: "List result" + run: "ls -l dist" + - name: "Check wheel contents" + run: "check-wheel-contents dist/*.whl" + - name: "Check long_description" + run: "python -m twine check dist/*" + # Automatically publish to PyPI when tags are pushed + # Added to https://github.com/python-attrs/attrs/blob/main/.github/workflows/main.yml + - name: Publish distribution to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 3c0a461..7c9849b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [tool.black] line-length = 79 -target-version = ['py37', 'py38', 'py39', 'py310'] +target-version = ['py310', 'py311', 'py312'] diff --git a/setup.py b/setup.py index d0ba76a..e95e551 100644 --- a/setup.py +++ b/setup.py @@ -30,9 +30,8 @@ def run(self): author="Jimmy Jia", author_email="tesrin@gmail.com", license="MIT", - python_requires=">=3.7", + python_requires=">=3.10", classifiers=[ - "Development Status :: 2 - Pre-Alpha", "Framework :: Flask", "Environment :: Web Environment", "Intended Audience :: Developers", @@ -40,16 +39,17 @@ def run(self): "Operating System :: OS Independent", "Programming Language :: Python", "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", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", ], keywords="storage s3 flask", - packages=("flask_annex",), + packages=[ + "flask_annex", + ], install_requires=("Flask >= 2.0", "packaging >= 17.0"), extras_require={ "s3": ("boto3 >= 1.4.0",), From d4fa419b594e65242807fa7613d1b35caf4ebe6b Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 17:40:17 -0400 Subject: [PATCH 02/24] remove travis workflow --- .travis.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d6c79f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: python -python: - - "3.10" - - "3.9" - - "3.8" - - "3.7" - -env: - - TOXENV=py-s3 - -jobs: - include: - - env: TOXENV=lint - - env: TOXENV=py-base - -cache: pip - -before_install: - - pip install -U pip -install: - - pip install -U codecov tox - -script: - - python setup.py test - -after_success: - - codecov - -branches: - only: - - master From 17b09a223a5fd405642f3525392886d5a0313ea5 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 20:04:25 -0400 Subject: [PATCH 03/24] move build link to gha --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d836ea4..0175c0e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Run `pip install -e .[s3,tests]` to install for development and with `S3` suppor [![Codecov][codecov-badge]][codecov] [build-badge]: https://img.shields.io/travis/4Catalyzer/flask-annex/master.svg -[build]: https://travis-ci.org/4Catalyzer/flask-annex +[build]: https://github.com/4Catalyzer/flask-annex/actions [pypi-badge]: https://img.shields.io/pypi/v/Flask-Annex.svg [pypi]: https://pypi.python.org/pypi/Flask-Annex [codecov-badge]: https://img.shields.io/codecov/c/github/4Catalyzer/flask-annex/master.svg From 7391f2db417f85461f8087c6272b8c18c37e324e Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 20:45:11 -0400 Subject: [PATCH 04/24] add codecov token --- .github/workflows/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 615b7c7..dd3ce44 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: name: "Python ${{ matrix.python-version }}" runs-on: "ubuntu-latest" env: - USING_COVERAGE: "3.12" + COVERAGE_PYTHON_VERSION: "3.12" strategy: matrix: @@ -43,13 +43,15 @@ jobs: with: python-version: "3.12" - - name: "Combine coverage" + - name: "Generate code coverage" + if: "contains(env.COVERAGE_PYTHON_VERSION, matrix.python-version)" run: | set -xe python -m coverage xml - if: "contains(env.USING_COVERAGE, matrix.python-version)" - - name: "Upload coverage to Codecov" - if: "contains(env.USING_COVERAGE, matrix.python-version)" + - name: "Upload coverage" + if: "contains(env.COVERAGE_PYTHON_VERSION, matrix.python-version)" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} uses: "codecov/codecov-action@v4" with: fail_ci_if_error: true @@ -63,7 +65,6 @@ jobs: - uses: "actions/setup-python@v5" with: python-version: "3.12" - - name: "Install build, check-wheel-content, and twine" run: "python -m pip install build twine check-wheel-contents" - name: "Build package" @@ -78,7 +79,7 @@ jobs: # Added to https://github.com/python-attrs/attrs/blob/main/.github/workflows/main.yml - name: Publish distribution to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From 724fbd8c432459c086ff8d1d3147a48c7ff6502d Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 20:48:27 -0400 Subject: [PATCH 05/24] dont need virtualenv dep --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd3ce44..5661e93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions + python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: "Run tox targets for ${{ matrix.python-version }}" run: "python -m tox" From 08fcc67f9a5cde2b7ff361c92976ff63feebf1a5 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:01:05 -0400 Subject: [PATCH 06/24] run ci on semver tag only --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5661e93..69291d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: push: branches: ["master"] tags: - - "*" + - "v[0-9].[0-9].[0-9]" pull_request: branches: ["master"] workflow_dispatch: From 020ead726f005ea7e71c351d9ca51c8bf05c3fad Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:04:20 -0400 Subject: [PATCH 07/24] update to gha badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0175c0e..68fd83b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Run `pip install -e .[s3,tests]` to install for development and with `S3` suppor [![Codecov][codecov-badge]][codecov] -[build-badge]: https://img.shields.io/travis/4Catalyzer/flask-annex/master.svg +[build-badge]: https://github.com/4Catalyzer/flask-annex/actions/workflows/main.yml/badge.svg [build]: https://github.com/4Catalyzer/flask-annex/actions [pypi-badge]: https://img.shields.io/pypi/v/Flask-Annex.svg [pypi]: https://pypi.python.org/pypi/Flask-Annex From efac85883b0278d0df7ebbb59af56404c1160519 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:06:25 -0400 Subject: [PATCH 08/24] allow semver pre-release tags --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69291d4..d32405a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: push: branches: ["master"] tags: - - "v[0-9].[0-9].[0-9]" + - "v[0-9].[0-9].[0-9]*" pull_request: branches: ["master"] workflow_dispatch: From 19430d9831a9bdf98dea434d9c5535c32de8ea84 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:07:06 -0400 Subject: [PATCH 09/24] remove old comment --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d32405a..857fccb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -# Adapted from https://github.com/python-attrs/attrs/blob/main/.github/workflows/main.yml ---- name: CI on: From a18ca6cfd602a636683b85cd3c1c6c33c78aed4e Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:13:03 -0400 Subject: [PATCH 10/24] parameterize COVERAGE_PYTHON_VERSION --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 857fccb..3a72378 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,12 +9,13 @@ on: branches: ["master"] workflow_dispatch: +env: + COVERAGE_PYTHON_VERSION: "3.12" + jobs: tests: name: "Python ${{ matrix.python-version }}" runs-on: "ubuntu-latest" - env: - COVERAGE_PYTHON_VERSION: "3.12" strategy: matrix: @@ -39,7 +40,7 @@ jobs: # parsing errors in older versions for modern code. - uses: "actions/setup-python@v5" with: - python-version: "3.12" + python-version: ${{ env.COVERAGE_PYTHON_VERSION }} - name: "Generate code coverage" if: "contains(env.COVERAGE_PYTHON_VERSION, matrix.python-version)" @@ -62,7 +63,7 @@ jobs: - uses: "actions/checkout@v4" - uses: "actions/setup-python@v5" with: - python-version: "3.12" + python-version: ${{ env.COVERAGE_PYTHON_VERSION }} - name: "Install build, check-wheel-content, and twine" run: "python -m pip install build twine check-wheel-contents" - name: "Build package" From 85b0b12110bb236cc90f0c75df1fa2071b4523d7 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:16:39 -0400 Subject: [PATCH 11/24] fix warning on coverage if clause --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a72378..3836b32 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,12 +43,12 @@ jobs: python-version: ${{ env.COVERAGE_PYTHON_VERSION }} - name: "Generate code coverage" - if: "contains(env.COVERAGE_PYTHON_VERSION, matrix.python-version)" + if: "${{ env.COVERAGE_PYTHON_VERSION == matrix.python-version }}" run: | set -xe python -m coverage xml - name: "Upload coverage" - if: "contains(env.COVERAGE_PYTHON_VERSION, matrix.python-version)" + if: "${{ env.COVERAGE_PYTHON_VERSION == matrix.python-version }}" env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} uses: "codecov/codecov-action@v4" From cb6b74a00f32c3b14ef7a572cfd0badddd47605b Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:17:42 -0400 Subject: [PATCH 12/24] update code coverage comment --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3836b32..ab4b7c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,8 +36,7 @@ jobs: - name: "Run tox targets for ${{ matrix.python-version }}" run: "python -m tox" - # We always use a modern Python version for combining coverage to prevent - # parsing errors in older versions for modern code. + # use a modern Python version for code coverage - uses: "actions/setup-python@v5" with: python-version: ${{ env.COVERAGE_PYTHON_VERSION }} From a26a08791697991a773ba59f707fd1c3924a331d Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 21:33:44 -0400 Subject: [PATCH 13/24] fix ci provider name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68fd83b..04c1f79 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Flask-Annex [![Travis][build-badge]][build] [![PyPI][pypi-badge]][pypi] +# Flask-Annex [![GitHub Actions][build-badge]][build] [![PyPI][pypi-badge]][pypi] Efficient integration of external storage services for [Flask](http://flask.pocoo.org/). From 61e5230c4061b4bb00222f5dd47e1cb939fd508b Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Wed, 4 Sep 2024 22:13:14 -0400 Subject: [PATCH 14/24] update tox python versions --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 949b075..ebede07 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = lint - py{37,38,39,310}-{base,s3} + py{310, 311, 312}-{base,s3} [testenv] usedevelop = True From 969a0fcce40c57c90506156e79d972f19f90653c Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 5 Sep 2024 17:04:29 -0400 Subject: [PATCH 15/24] use pytest.fixture --- tests/test_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_s3.py b/tests/test_s3.py index be02ede..1cd316a 100644 --- a/tests/test_s3.py +++ b/tests/test_s3.py @@ -20,7 +20,7 @@ # ----------------------------------------------------------------------------- -@pytest.yield_fixture +@pytest.fixture def bucket_name(): with mock_s3(): bucket = boto3.resource("s3").Bucket("flask-annex") From e47830352050fccf8f9a83a51e37bdf0e316435c Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 5 Sep 2024 17:59:21 -0400 Subject: [PATCH 16/24] update flake8 config syntax --- .flake8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 043e7a0..c2399d7 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,7 @@ [flake8] -ignore = E,W503 # Let Black handle all the formatting. +ignore = + # Let Black handle all the formatting. + E,W503 exclude = tests/snapshots, .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg From 1cf1c1adc33514a4e56aba125873cd0a0e2faee9 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 5 Sep 2024 17:59:41 -0400 Subject: [PATCH 17/24] update precommit dep versions --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f9a8cf..29aea20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,11 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.31.1 + rev: v3.17.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py310-plus] - repo: https://github.com/4Catalyzer/fourmat - rev: v0.11.1 + rev: v1.0.0 hooks: - id: fourmat + additional_dependencies: ['setuptools>=74'] From 6b3c0403f611d64393fdf910b043b72f0e8a4516 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 5 Sep 2024 18:00:16 -0400 Subject: [PATCH 18/24] update moto usage --- tests/test_s3.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_s3.py b/tests/test_s3.py index 1cd316a..fe49705 100644 --- a/tests/test_s3.py +++ b/tests/test_s3.py @@ -13,16 +13,17 @@ try: import boto3 import requests - from moto import mock_s3 + from moto import mock_aws except ImportError: pytestmark = pytest.mark.skipif(True, reason="S3 support not installed") + raise # ----------------------------------------------------------------------------- @pytest.fixture def bucket_name(): - with mock_s3(): + with mock_aws(): bucket = boto3.resource("s3").Bucket("flask-annex") bucket.create() @@ -88,7 +89,7 @@ def test_get_upload_info(self, client): assert upload_info["url"] == "https://flask-annex.s3.amazonaws.com/" assert upload_info["post_data"][0] == ["Content-Type", "text/plain"] assert upload_info["post_data"][1] == ["key", "foo/qux.txt"] - assert upload_info["post_data"][2] == ["AWSAccessKeyId", "foobar_key"] + assert upload_info["post_data"][2] == ["AWSAccessKeyId", "FOOBARKEY"] assert upload_info["post_data"][3][0] == "policy" assert upload_info["post_data"][4][0] == "signature" From 3eeb673279ebbeb86452aa5338d87815c0a58392 Mon Sep 17 00:00:00 2001 From: Stephen Liu Date: Thu, 5 Sep 2024 18:05:06 -0400 Subject: [PATCH 19/24] revert raise, was for testing --- tests/test_s3.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_s3.py b/tests/test_s3.py index fe49705..363ef28 100644 --- a/tests/test_s3.py +++ b/tests/test_s3.py @@ -16,7 +16,6 @@ from moto import mock_aws except ImportError: pytestmark = pytest.mark.skipif(True, reason="S3 support not installed") - raise # ----------------------------------------------------------------------------- From b8ff387fd7f24ad745425579d769d12fdf76c96c Mon Sep 17 00:00:00 2001 From: Matthew McLaughlin Date: Thu, 5 Sep 2024 16:32:18 -0700 Subject: [PATCH 20/24] wip: fix gh actions --- .github/workflows/main.yml | 18 ++++++++++++++++-- tox.ini | 6 ++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab4b7c3..8f5bb4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ env: COVERAGE_PYTHON_VERSION: "3.12" jobs: - tests: + tests: name: "Python ${{ matrix.python-version }}" runs-on: "ubuntu-latest" @@ -22,6 +22,19 @@ jobs: python-version: ["3.10", "3.11", "3.12"] steps: + # - uses: actions/checkout@v3 + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # python -m pip install tox tox-gh-actions + # - name: Test with tox + # run: tox + + - uses: "actions/checkout@v4" - uses: "actions/setup-python@v5" with: @@ -34,7 +47,8 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: "Run tox targets for ${{ matrix.python-version }}" - run: "python -m tox" + # run: "python -m tox" + run: tox # use a modern Python version for code coverage - uses: "actions/setup-python@v5" diff --git a/tox.ini b/tox.ini index ebede07..035e180 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,12 @@ envlist = lint py{310, 311, 312}-{base,s3} +[gh-actions] +python = + 3.10: lint, py-base, py-s3 + 3.11: lint, py-base, py-s3 + 3.12: lint, py-base, py-s3 + [testenv] usedevelop = True deps = From 6c5cec771180a210c6f6976415b413d6425f9360 Mon Sep 17 00:00:00 2001 From: Matthew McLaughlin Date: Thu, 5 Sep 2024 16:34:44 -0700 Subject: [PATCH 21/24] kickoff ghaction on test branch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f5bb4f..ceec54b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: ["master"] + branches: ["chore/migrate_github_actions_tox_github"] tags: - "v[0-9].[0-9].[0-9]*" pull_request: From 7f83c16e4b48c6a788127a6ccc3d528cca3bc666 Mon Sep 17 00:00:00 2001 From: Matthew McLaughlin Date: Thu, 5 Sep 2024 16:40:25 -0700 Subject: [PATCH 22/24] fix matrix --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 035e180..c4a8193 100644 --- a/tox.ini +++ b/tox.ini @@ -5,9 +5,9 @@ envlist = [gh-actions] python = - 3.10: lint, py-base, py-s3 - 3.11: lint, py-base, py-s3 - 3.12: lint, py-base, py-s3 + 3.10: lint, py + 3.11: lint, py + 3.12: lint, py [testenv] usedevelop = True From fe00b16fadaa0380808eb479df0d7a3eccf96a08 Mon Sep 17 00:00:00 2001 From: Matthew McLaughlin Date: Thu, 5 Sep 2024 16:43:36 -0700 Subject: [PATCH 23/24] fix matrix 2 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index c4a8193..6b31f3e 100644 --- a/tox.ini +++ b/tox.ini @@ -5,9 +5,9 @@ envlist = [gh-actions] python = - 3.10: lint, py - 3.11: lint, py - 3.12: lint, py + 3.10: lint, py310 + 3.11: lint, py311 + 3.12: lint, py312 [testenv] usedevelop = True From 9663b12b00ecc6f44a2f97b7e2dc818b1a22067a Mon Sep 17 00:00:00 2001 From: Matthew McLaughlin Date: Thu, 5 Sep 2024 16:47:29 -0700 Subject: [PATCH 24/24] cleanup --- .github/workflows/main.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ceec54b..46cadf2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: ["chore/migrate_github_actions_tox_github"] + branches: ["master"] tags: - "v[0-9].[0-9].[0-9]*" pull_request: @@ -13,7 +13,7 @@ env: COVERAGE_PYTHON_VERSION: "3.12" jobs: - tests: + tests: name: "Python ${{ matrix.python-version }}" runs-on: "ubuntu-latest" @@ -22,19 +22,6 @@ jobs: python-version: ["3.10", "3.11", "3.12"] steps: - # - uses: actions/checkout@v3 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install tox tox-gh-actions - # - name: Test with tox - # run: tox - - - uses: "actions/checkout@v4" - uses: "actions/setup-python@v5" with: @@ -47,7 +34,6 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade coverage[toml] tox tox-gh-actions - name: "Run tox targets for ${{ matrix.python-version }}" - # run: "python -m tox" run: tox # use a modern Python version for code coverage