From d200930150bc2f4e08f509b5462bbe125a10908a Mon Sep 17 00:00:00 2001 From: Michael Moen Allport Date: Thu, 4 Apr 2024 08:45:09 +0200 Subject: [PATCH] Fix workflow failures (#370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test without upgrade pip * Prefix paths with github workspace * Fixed invalid paths * Fix paths * Fix paths --------- Co-authored-by: Bjørn-Andre Skaar <31540110+bjornandre@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 31 ++++++------------------------- 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 38eee6fd..69efd6dc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: - name: Install Poetry run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Set up Python diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43bb5c92..84fff166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,12 +27,12 @@ jobs: - name: Upgrade pip run: | - pip install -c .github/workflows/constraints.txt pip + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip pip --version - name: Install Poetry run: | - pip install -c .github/workflows/constraints.txt poetry + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt poetry poetry --version - name: Check if there is a parent commit @@ -49,7 +49,7 @@ jobs: bash -o pipefail -c "poetry version | cut -f 2 -d' '" - name: Bump version for developmental release - if: "! steps.check-version.outputs.tag" + if: '! steps.check-version.outputs.tag' run: | poetry version patch && version=$(poetry version | awk '{ print $2 }') && diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 125c1bea..0dd47d90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,29 +42,15 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Upgrade pip - run: | - pip install -c .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 "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Install Nox run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" nox - pipx inject --pip-args "-c .github/workflows/constraints.txt" nox nox-poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox + pipx inject --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry nox --version - name: Compute pre-commit cache key @@ -124,20 +110,15 @@ jobs: with: python-version: "3.11" - - name: Upgrade pip - run: | - pip install -c .github/workflows/constraints.txt pip - pip --version - - name: Install Poetry run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Install Nox run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" nox - pipx inject --pip-args "-c .github/workflows/constraints.txt" nox nox-poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox + pipx inject --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry nox --version - name: Download coverage data