diff --git a/.env-example b/.env-example index 4bcfcf1..bbdc052 100644 --- a/.env-example +++ b/.env-example @@ -1,4 +1,4 @@ USE_LOCAL_CACHE_STORAGE_BACKEND=1 -PYTHON_VERSION=3.9.18 +PYTHON_VERSION=3.12.0 OS_VARIANT=slim-bookworm POETRY_VERSION=1.6.1 diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 60392e8..9155c3b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install Poetry uses: snok/install-poetry@v1 with: @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: ["3.9.18", "3.10.13", "3.11.5"] + python_version: ["3.10.13", "3.11.6", "3.12.0"] os_variant: ["bookworm", "slim-bookworm"] poetry_version: ["1.4.2", "1.5.1", "1.6.1"] steps: @@ -50,7 +50,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install Poetry uses: snok/install-poetry@v1 with: @@ -73,12 +73,14 @@ jobs: POETRY_VERSION: ${{ matrix.poetry_version }} run: | source .venv/bin/activate - pytest tests/build_image --cov - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + pytest tests/build_image --cov --cov-report=xml:build_image_coverage_report.xml + - name: Upload coverage report to artifactory + uses: actions/upload-artifact@v3 with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + name: build-image-coverage-report-${{ matrix.python_version }}-${{ matrix.os_variant }}-${{ matrix.poetry_version }} + path: build_image_coverage_report.xml + if-no-files-found: error + retention-days: 1 run-publish-image-tests: needs: code-quality @@ -86,7 +88,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: ["3.9.18", "3.10.13", "3.11.5"] + python_version: ["3.10.13", "3.11.6", "3.12.0"] os_variant: ["bookworm", "slim-bookworm"] poetry_version: ["1.4.2", "1.5.1", "1.6.1"] steps: @@ -97,7 +99,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install Poetry uses: snok/install-poetry@v1 with: @@ -120,23 +122,43 @@ jobs: POETRY_VERSION: ${{ matrix.poetry_version }} run: | source .venv/bin/activate - pytest tests/publish_image --cov + pytest tests/publish_image --cov --cov-report=xml:publish_image_coverage_report.xml + - name: Upload coverage report to artifactory + uses: actions/upload-artifact@v3 + with: + name: publish-image-coverage-report-${{ matrix.python_version }}-${{ matrix.os_variant }}-${{ matrix.poetry_version }} + path: publish_image_coverage_report.xml + if-no-files-found: error + retention-days: 1 + + upload-test-coverage-reports: + needs: + - run-build-image-tests + - run-publish-image-tests + runs-on: ubuntu-20.04 + steps: + - name: Download coverage reports from artifactory + uses: actions/download-artifact@v3 + - name: Compile the relevant reports + run: | + find . -name "*.xml" -exec cp {} . \; - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: + files: ./build_image_coverage_report.xml,./publish_image_coverage_report.xml fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - + + publish-all-images: needs: - - run-build-image-tests - - run-publish-image-tests + - upload-test-coverage-reports if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - python_version: ["3.9.18", "3.10.13", "3.11.5"] + python_version: ["3.10.13", "3.11.6", "3.12.0"] os_variant: ["bookworm", "slim-bookworm"] poetry_version: ["1.4.2", "1.5.1", "1.6.1"] steps: @@ -149,7 +171,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install Poetry uses: snok/install-poetry@v1 with: diff --git a/.gitignore b/.gitignore index e49a264..1ccbaa6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ .idea .vscode .pytest_cache +.python-version +.coverage __pycache__ diff --git a/README.md b/README.md index 381e657..2f102d6 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ This multiarch image supports AMD64 and ARM64 architectures. * v1.6.1 **Python versions:** -* v3.9 * v3.10 * v3.11 +* v3.12 **Operating system:** * [Debian Bookworm v12.1](https://www.debian.org/releases/bookworm/) diff --git a/poetry.lock b/poetry.lock index a5ccf49..d196da0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -22,9 +22,6 @@ files = [ {file = "astroid-3.0.0.tar.gz", hash = "sha256:1defdbca052635dd29657ea674edfc45e4b5be9cd53630c5b084fcfed94344a8"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} - [[package]] name = "bcrypt" version = "4.0.1" @@ -96,8 +93,6 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -392,20 +387,6 @@ files = [ [package.dependencies] regex = ">=2019.4.14" -[[package]] -name = "exceptiongroup" -version = "1.1.3" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, - {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, -] - -[package.extras] -test = ["pytest (>=6)"] - [[package]] name = "filelock" version = "3.12.4" @@ -761,13 +742,11 @@ files = [ [package.dependencies] astroid = ">=3.0.0,<=3.1.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.2", markers = "python_version < \"3.11\""} +dill = {version = ">=0.3.6", markers = "python_version >= \"3.11\""} isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -786,11 +765,9 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1337,5 +1314,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "3.9.*" -content-hash = "39a6688e98cfc36daf7e21bf1bbc29828a52ef0b6343515c88676c93285f092a" +python-versions = "3.11.*" +content-hash = "76a9b481793badb4369ae2a4f9d8fbd2dfd38e5191c6302a27c5fab3291de7ec" diff --git a/pyproject.toml b/pyproject.toml index 4db4153..a9a8174 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [tool.poetry] name = "python-poetry" -version = "1.2.0" +version = "1.7.0" description = "A Python Docker image with Poetry installed and ready to use." authors = ["Max Pfeiffer "] license = "MIT" [tool.poetry.dependencies] -python = "3.9.*" +python = "3.11.*" click = "8.1.7" python-on-whales = "0.65.0" @@ -33,7 +33,7 @@ testpaths = [ # https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file [tool.black] line-length = 80 -target-version = ["py39"] +target-version = ["py311"] [tool.pylint.main] errors-only = true