From 82f60ecf9b0faa30568155ba630c7944d12f8ef2 Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Mon, 16 May 2022 16:23:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20[github]=20Pin=20pip=20in=20virt?= =?UTF-8?q?ual=20environments=20(#693)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 👷 [github] Set `VIRTUALENV_PIP` to pin pip in virtual environments * 👷 [github] Append to GITHUB_ENV in Python This is horrible, but apparently Powershell's quote handling is too broken to do this portably in the default shell. The previous version just ate the double quotes. Retrocookie-Original-Commit: cjolowicz/cookiecutter-hypermodern-python-instance@4463434 --- .github/workflows/tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e551096..0900850e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,6 +46,15 @@ jobs: pip install --constraint=.github/workflows/constraints.txt pip pip --version + - name: Upgrade pip in virtual environments + shell: python + run: | + import os + import pip + + with open(os.environ["GITHUB_ENV"], mode="a") as io: + print(f"VIRTUALENV_PIP={pip.__version__}", file=io) + - name: Install Poetry run: | pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry