From 9dadf1cd29087ab6a4cc4e0460eac143da8da83d Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Wed, 18 Sep 2024 10:39:41 +0200 Subject: [PATCH 1/3] gh actions: pin python patch versions to avoid "pip cache not found" / ".../.venv/bin/python: bad interpreter: No such file or directory" --- .github/workflows/tests.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 98ba513615..1dc82791a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,22 +133,22 @@ jobs: matrix: include: # Static analysis and utilities - - { name: "Ruff", python: "3.11", os: ubuntu-latest, tox: "ruff" } - - { name: "Mypy", python: "3.10", os: ubuntu-latest, tox: "mypy" } + - { name: "Ruff", python: "3.11.9", os: ubuntu-latest, tox: "ruff" } + - { name: "Mypy", python: "3.11.9", os: ubuntu-latest, tox: "mypy" } # Verification of builds and other aspects - - { name: "Docs Build", python: "3.10", os: ubuntu-latest, tox: "docs" } + - { name: "Docs Build", python: "3.11.9", os: ubuntu-latest, tox: "docs" } # OS Integration tests - - { name: "Linux", python: "3.12", os: ubuntu-latest, tox: fail_fast_test_main_external_package } - - { name: "Windows", python: '3.12.5', os: windows-latest, tox: fail_fast_test_main_external_package } - - { name: "MacOS", python: '3.12', os: macos-latest, tox: fail_fast_test_main_external_package } + - { name: "Linux", python: "3.11.9", os: ubuntu-latest, tox: fail_fast_test_main_external_package } + - { name: "Windows", python: '3.11.9', os: windows-latest, tox: fail_fast_test_main_external_package } + - { name: "MacOS", python: '3.11.9', os: macos-latest, tox: fail_fast_test_main_external_package } # Unit tests on Python versions - - { name: "Python 3.12", python: "3.12", os: ubuntu-latest, tox: py312 } - - { name: "Python 3.11", python: "3.11", os: ubuntu-latest, tox: py311 } - - { name: "Python 3.10", python: "3.10", os: ubuntu-latest, tox: py310 } - - { name: "Python 3.9", python: "3.9", os: ubuntu-latest, tox: py39 } + - { name: "Python 3.12", python: "3.12.5", os: ubuntu-latest, tox: py312 } + - { name: "Python 3.11", python: "3.11.9", os: ubuntu-latest, tox: py311 } + - { name: "Python 3.10", python: "3.10.14", os: ubuntu-latest, tox: py310 } + - { name: "Python 3.9", python: "3.9.20", os: ubuntu-latest, tox: py39 } steps: - uses: actions/checkout@v4 From adb9c7ffb2cc7aadb9dd8643b9f899693ad61dab Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Thu, 19 Sep 2024 09:19:57 +0200 Subject: [PATCH 2/3] gh actions: pin python patch versions to avoid caching problem --- .github/workflows/tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1dc82791a6..0edfa46605 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,16 +133,16 @@ jobs: matrix: include: # Static analysis and utilities - - { name: "Ruff", python: "3.11.9", os: ubuntu-latest, tox: "ruff" } - - { name: "Mypy", python: "3.11.9", os: ubuntu-latest, tox: "mypy" } + - { name: "Ruff", python: "3.12.5", os: ubuntu-latest, tox: "ruff" } + - { name: "Mypy", python: "3.12.5", os: ubuntu-latest, tox: "mypy" } # Verification of builds and other aspects - - { name: "Docs Build", python: "3.11.9", os: ubuntu-latest, tox: "docs" } + - { name: "Docs Build", python: "3.12.5", os: ubuntu-latest, tox: "docs" } # OS Integration tests - - { name: "Linux", python: "3.11.9", os: ubuntu-latest, tox: fail_fast_test_main_external_package } - - { name: "Windows", python: '3.11.9', os: windows-latest, tox: fail_fast_test_main_external_package } - - { name: "MacOS", python: '3.11.9', os: macos-latest, tox: fail_fast_test_main_external_package } + - { name: "Linux", python: "3.12.5", os: ubuntu-latest, tox: fail_fast_test_main_external_package } + - { name: "Windows", python: '3.12.5', os: windows-latest, tox: fail_fast_test_main_external_package } + - { name: "MacOS", python: '3.12.5', os: macos-latest, tox: fail_fast_test_main_external_package } # Unit tests on Python versions - { name: "Python 3.12", python: "3.12.5", os: ubuntu-latest, tox: py312 } From a8bcebac37b1fbf568a2fbca61597f4e99975af3 Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Thu, 19 Sep 2024 09:28:37 +0200 Subject: [PATCH 3/3] gh: always build even if we think there's a cache hit --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0edfa46605..6cf3f763e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,7 +56,7 @@ jobs: path: .venv key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --no-interaction --no-root --no-plugins # Install node and yarn in order to build the front end during packaging @@ -180,7 +180,7 @@ jobs: path: .venv key: venv-tox-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --no-interaction --no-root --with test,docs --no-plugins # Grab the built artifacts to ensure we're testing what we eventually publish