Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
04f65ce
Added a test for the Python version
tomuben Aug 5, 2025
3b26791
Fixed name of job
tomuben Aug 5, 2025
52bf528
Fixed action.yml
tomuben Aug 5, 2025
5432827
Debug
tomuben Aug 5, 2025
27c5d5f
Debug
tomuben Aug 5, 2025
aa350cb
Debug
tomuben Aug 5, 2025
58a75d5
Debug
tomuben Aug 5, 2025
d7b54cf
Debug
tomuben Aug 5, 2025
604f89f
Debug
tomuben Aug 5, 2025
2a1e659
Debug
tomuben Aug 5, 2025
b097e9b
Debug
tomuben Aug 5, 2025
e17ccc0
Debug
tomuben Aug 5, 2025
bbc1b3d
Debug
tomuben Aug 5, 2025
3265847
Debug
tomuben Aug 5, 2025
8a75b09
Debug
tomuben Aug 5, 2025
8e68a96
Debug
tomuben Aug 5, 2025
03b44d5
Debug
tomuben Aug 5, 2025
25809ed
Debug
tomuben Aug 5, 2025
9615788
Debug
tomuben Aug 5, 2025
f334f6b
Debug
tomuben Aug 5, 2025
5ce3eec
Debug
tomuben Aug 5, 2025
f56e7e6
Debug
tomuben Aug 5, 2025
4ec940c
Debug
tomuben Aug 5, 2025
8e3e4a8
Debug
tomuben Aug 5, 2025
9b722e0
Debug
tomuben Aug 5, 2025
5e8960c
Debug
tomuben Aug 5, 2025
9917415
Debug
tomuben Aug 5, 2025
9d75090
Debug
tomuben Aug 5, 2025
cf7d606
Debug
tomuben Aug 5, 2025
403616a
Debug
tomuben Aug 5, 2025
8ddefa0
Debug
tomuben Aug 5, 2025
a7638b3
Debug
tomuben Aug 5, 2025
f36dcc5
Debug
tomuben Aug 5, 2025
dce4ef1
Debug
tomuben Aug 5, 2025
b8456d1
Debug
tomuben Aug 5, 2025
bc80758
Debug
tomuben Aug 5, 2025
5c97bfb
Debug
tomuben Aug 5, 2025
e45fe13
Debug
tomuben Aug 5, 2025
eee1eed
Debug
tomuben Aug 5, 2025
22f4603
Test
tomuben Aug 5, 2025
6664cfe
Debug
tomuben Aug 5, 2025
73c793b
Debug
tomuben Aug 5, 2025
ed3e332
Debug
tomuben Aug 5, 2025
f833c68
Debug
tomuben Aug 5, 2025
3052b1e
Debug
tomuben Aug 5, 2025
0900acb
Debug
tomuben Aug 5, 2025
103d89f
Debug
tomuben Aug 5, 2025
75f9e72
Debug
tomuben Aug 5, 2025
4846ba7
Debug
tomuben Aug 5, 2025
c502233
Debug
tomuben Aug 5, 2025
20b1e22
Debug
tomuben Aug 5, 2025
7b320d7
Debug
tomuben Aug 5, 2025
0575698
Debug
tomuben Aug 5, 2025
e0b0364
Debug
tomuben Aug 5, 2025
258922c
Debug
tomuben Aug 5, 2025
0b2a27c
Debug
tomuben Aug 5, 2025
afdcb05
Debug
tomuben Aug 5, 2025
5adb8af
Debug
tomuben Aug 5, 2025
c24391a
Debug
tomuben Aug 5, 2025
05f1500
Debug
tomuben Aug 5, 2025
2656309
Debug
tomuben Aug 5, 2025
9d5a899
Debug
tomuben Aug 5, 2025
a928bd9
Debug
tomuben Aug 5, 2025
af544e0
Test
tomuben Aug 5, 2025
f82850f
Test
tomuben Aug 5, 2025
1450404
Debug
tomuben Aug 5, 2025
d6fa6a5
Debug
tomuben Aug 5, 2025
4a18b18
Debug
tomuben Aug 5, 2025
e01bdc4
Fixes from review
tomuben Aug 6, 2025
57fff2b
Added arch and poetry lock sha to Cache key.
tomuben Aug 6, 2025
af42bbc
Fixed generation of sha
tomuben Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 42 additions & 10 deletions .github/actions/python-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
poetry-version:
description: 'Poetry version to use'
required: true
default: "2.1.2"
default: "2.1.4"

working-directory:
description: 'Working directory to use'
Expand All @@ -32,29 +32,61 @@ runs:
using: "composite"
steps:

- name: Set up pipx if not present

- name: Set up Python (${{ inputs.python-version}})
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Ensure wget
shell: bash
run: sudo apt update && sudo apt install -y wget

- name: Set up Poetry (${{ inputs.poetry-version }})
shell: bash
run: |
sudo apt update && sudo apt install -y pipx
python3 -m pipx ensurepath
wget --tries=10 --waitretry 10 --retry-connrefused --https-only -O - https://install.python-poetry.org | POETRY_VERSION="${{ inputs.poetry-version }}" "$PYTHON_BINARY" -
echo "$HOME/.local/bin" >> $GITHUB_PATH
env:
PYTHON_BINARY: "python${{ inputs.python-version }}"

- name: Set up Poetry (${{ inputs.poetry-version }})
- name: Setup cache variables
id: setup-cache-variables
shell: bash
run: pipx install poetry==${{ inputs.poetry-version }}
run: |
echo "ImageOS=$ImageOS"
echo "ImageVersion=$ImageVersion"
POETRY_ENV_PATH=$(poetry config virtualenvs.path)
POETRY_SHA=$(sha256sum poetry.lock | awk '{print $1}') #Remove trailing filename
echo "POETRY_ENV_PATH=$POETRY_ENV_PATH" >> $GITHUB_OUTPUT
echo "IMAGE_OS=$ImageOS" >> $GITHUB_OUTPUT
echo "IMAGE_VERSION=$ImageVersion" >> $GITHUB_OUTPUT
echo "POETRY_SHA=$POETRY_SHA" >> $GITHUB_OUTPUT


- name: Set up Python (${{ inputs.python-version}})
uses: actions/setup-python@v5
- name: Cache Poetry environment
if: inputs.use-cache == 'true'
id: cache-poetry-env
uses: actions/cache@v4
with:
python-version: ${{ inputs.python-version }}
cache: ${{ inputs.use-cache == 'true' && 'poetry' || '' }}
path: ${{ steps.setup-cache-variables.outputs.POETRY_ENV_PATH }}
key: poetry-env-${{ steps.setup-cache-variables.outputs.POETRY_SHA }}-${{ steps.setup-cache-variables.outputs.IMAGE_OS }}-${{ steps.setup-cache-variables.outputs.IMAGE_VERSION }}-${{ runner.arch }}-${{ inputs.poetry-version }}-${{ inputs.python-version }}-${{ inputs.extras }}

- name: Poetry install with extras
if: inputs.use-cache != 'true' || steps.cache-poetry-env.outputs.cache-hit != 'true'
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
EXTRAS=$(echo "${{ inputs.extras }}" | tr -d ' ')
if [[ -n "$EXTRAS" ]]; then
poetry install --extras "$EXTRAS"
else
poetry install
fi

- name: Validate Poetry environment
working-directory: ${{ inputs.working-directory }}
shell: bash
run: |
poetry run python --version
poetry run python --version | grep "${{ inputs.python-version }}"
18 changes: 16 additions & 2 deletions .github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,30 @@ jobs:
- int-linux-x64-4core-gpu-t4-ubuntu24.04-1
- int-linux-x64-4core-ubuntu24.04-1
- int-linux-x64-2core-ubuntu24.04-1
name: Install Pipx on ${{ matrix.runner }}
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
name: Install Pipx on ${{ matrix.runner }} with Python "${{ matrix.python-version }}"
runs-on:
labels: ${{ matrix.runner }}

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
- name: Set up Python & Poetry Environment
uses: ./.github/actions/python-environment
with:
python-version: "${{ matrix.python-version }}"

- name: Poetry version
run: poetry --version

- name: Validate Python version
run: |
poetry run which python
poetry run python --version
poetry env list
poetry run python --version | grep "${{ matrix.python-version }}"
5 changes: 5 additions & 0 deletions doc/changes/changes_1.7.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
## Bugfixes

* #523: Fixed `pipx` installation for older versions of `pip`

## Refactorings

* #525: Added tests for installing `pipx` on different GitHub runners

4 changes: 2 additions & 2 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

## Refactorings
## Bugfixes

* #525: Added tests for installing `pipx` on different GitHub runners
* #527: Use correct Python version in actions/python-environment