From 2a4ba32af2f368a728a25c9b08409745e4314914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 28 Jul 2023 14:56:55 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Deprecate=20Python=203.6?= =?UTF-8?q?=20and=20add=20CI=20for=20latest=20versions=20(#32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 20 +++++++++++++++++-- README.md | 2 +- tests/assets/custom_packages/pyproject.toml | 2 +- tests/assets/git_tag/pyproject.toml | 2 +- tests/assets/multiple_packages/pyproject.toml | 2 +- tests/assets/no_config/pyproject.toml | 2 +- tests/assets/no_config_source/pyproject.toml | 2 +- tests/assets/no_packages/pyproject.toml | 2 +- tests/assets/no_standard_dir/pyproject.toml | 2 +- tests/assets/no_version_var/pyproject.toml | 2 +- tests/assets/variations/pyproject.toml | 2 +- 11 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 757c896..5bafeb7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,8 +2,12 @@ name: Test on: push: + branches: + - master pull_request: - types: [opened, synchronize] + types: + - opened + - synchronize workflow_dispatch: inputs: debug_enabled: @@ -16,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] fail-fast: false steps: @@ -58,3 +62,15 @@ jobs: run: python -m poetry run bash scripts/test.sh - name: Upload coverage uses: codecov/codecov-action@v1 + + # https://github.com/marketplace/actions/alls-green#why + check: # This job does nothing and is only used for the branch protection + if: always() + needs: + - test + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/README.md b/README.md index bbeec4e..8819159 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ You could manually write the `__version__` variable and handle the synchronizati The current [official way of doing it without duplicating the value](https://github.com/python-poetry/poetry/pull/2366#issuecomment-652418094) is with `importlib.metadata`. -But that module is only available in Python 3.8 and above. So, for Python 3.7 and 3.6 you have to install a backport as a dependency of your package: +But that module is only available in Python 3.8 and above. So, for Python 3.7 you have to install a backport as a dependency of your package: ```toml [tool.poetry.dependencies] diff --git a/tests/assets/custom_packages/pyproject.toml b/tests/assets/custom_packages/pyproject.toml index 57e9de2..0500a1a 100644 --- a/tests/assets/custom_packages/pyproject.toml +++ b/tests/assets/custom_packages/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" packages = [{include = "custom_package"}] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/git_tag/pyproject.toml b/tests/assets/git_tag/pyproject.toml index 416b8dd..2b272d5 100644 --- a/tests/assets/git_tag/pyproject.toml +++ b/tests/assets/git_tag/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/multiple_packages/pyproject.toml b/tests/assets/multiple_packages/pyproject.toml index f29ac47..a2ad416 100644 --- a/tests/assets/multiple_packages/pyproject.toml +++ b/tests/assets/multiple_packages/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" packages = [{include = "custom_package"}, {include = "custom_packageb"}] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/no_config/pyproject.toml b/tests/assets/no_config/pyproject.toml index 41e8e3d..dba7b7a 100644 --- a/tests/assets/no_config/pyproject.toml +++ b/tests/assets/no_config/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/no_config_source/pyproject.toml b/tests/assets/no_config_source/pyproject.toml index 6ce8a85..b52d88e 100644 --- a/tests/assets/no_config_source/pyproject.toml +++ b/tests/assets/no_config_source/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/no_packages/pyproject.toml b/tests/assets/no_packages/pyproject.toml index cef1faa..a863dc7 100644 --- a/tests/assets/no_packages/pyproject.toml +++ b/tests/assets/no_packages/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/no_standard_dir/pyproject.toml b/tests/assets/no_standard_dir/pyproject.toml index 7960488..128d8d6 100644 --- a/tests/assets/no_standard_dir/pyproject.toml +++ b/tests/assets/no_standard_dir/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" packages = [{include = "test_custom_version", from = "src"}] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/no_version_var/pyproject.toml b/tests/assets/no_version_var/pyproject.toml index cef1faa..a863dc7 100644 --- a/tests/assets/no_version_var/pyproject.toml +++ b/tests/assets/no_version_var/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"] diff --git a/tests/assets/variations/pyproject.toml b/tests/assets/variations/pyproject.toml index cef1faa..a863dc7 100644 --- a/tests/assets/variations/pyproject.toml +++ b/tests/assets/variations/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Sebastián Ramírez "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" [build-system] requires = ["poetry-core"]