Skip to content

Commit eabff53

Browse files
committed
Merge branch 'main' into refactoring/518-make-audit-class-more-extendable
2 parents 2a3b835 + 31b1ad7 commit eabff53

File tree

18 files changed

+91
-38
lines changed

18 files changed

+91
-38
lines changed

.github/actions/python-environment/action.yml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111
poetry-version:
1212
description: 'Poetry version to use'
1313
required: true
14-
default: "2.1.2"
14+
default: "2.1.4"
1515

1616
working-directory:
1717
description: 'Working directory to use'
@@ -32,29 +32,61 @@ runs:
3232
using: "composite"
3333
steps:
3434

35-
- name: Set up pipx if not present
35+
36+
- name: Set up Python (${{ inputs.python-version}})
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: ${{ inputs.python-version }}
40+
41+
- name: Ensure wget
42+
shell: bash
43+
run: sudo apt update && sudo apt install -y wget
44+
45+
- name: Set up Poetry (${{ inputs.poetry-version }})
3646
shell: bash
3747
run: |
38-
sudo apt update && sudo apt install -y pipx
39-
python3 -m pipx ensurepath
48+
wget --tries=10 --waitretry 10 --retry-connrefused --https-only -O - https://install.python-poetry.org | POETRY_VERSION="${{ inputs.poetry-version }}" "$PYTHON_BINARY" -
4049
echo "$HOME/.local/bin" >> $GITHUB_PATH
50+
env:
51+
PYTHON_BINARY: "python${{ inputs.python-version }}"
4152

42-
- name: Set up Poetry (${{ inputs.poetry-version }})
53+
- name: Setup cache variables
54+
id: setup-cache-variables
4355
shell: bash
44-
run: pipx install poetry==${{ inputs.poetry-version }}
56+
run: |
57+
echo "ImageOS=$ImageOS"
58+
echo "ImageVersion=$ImageVersion"
59+
POETRY_ENV_PATH=$(poetry config virtualenvs.path)
60+
POETRY_SHA=$(sha256sum poetry.lock | awk '{print $1}') #Remove trailing filename
61+
echo "POETRY_ENV_PATH=$POETRY_ENV_PATH" >> $GITHUB_OUTPUT
62+
echo "IMAGE_OS=$ImageOS" >> $GITHUB_OUTPUT
63+
echo "IMAGE_VERSION=$ImageVersion" >> $GITHUB_OUTPUT
64+
echo "POETRY_SHA=$POETRY_SHA" >> $GITHUB_OUTPUT
65+
4566
46-
- name: Set up Python (${{ inputs.python-version}})
47-
uses: actions/setup-python@v5
67+
- name: Cache Poetry environment
68+
if: inputs.use-cache == 'true'
69+
id: cache-poetry-env
70+
uses: actions/cache@v4
4871
with:
49-
python-version: ${{ inputs.python-version }}
50-
cache: ${{ inputs.use-cache == 'true' && 'poetry' || '' }}
72+
path: ${{ steps.setup-cache-variables.outputs.POETRY_ENV_PATH }}
73+
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 }}
5174

5275
- name: Poetry install with extras
76+
if: inputs.use-cache != 'true' || steps.cache-poetry-env.outputs.cache-hit != 'true'
5377
working-directory: ${{ inputs.working-directory }}
5478
shell: bash
5579
run: |
80+
EXTRAS=$(echo "${{ inputs.extras }}" | tr -d ' ')
5681
if [[ -n "$EXTRAS" ]]; then
5782
poetry install --extras "$EXTRAS"
5883
else
5984
poetry install
6085
fi
86+
87+
- name: Validate Poetry environment
88+
working-directory: ${{ inputs.working-directory }}
89+
shell: bash
90+
run: |
91+
poetry run python --version
92+
poetry run python --version | grep "${{ inputs.python-version }}"

.github/actions/security-issues/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ runs:
3939
- name: Install Python Toolbox / Security tool
4040
shell: bash
4141
run: |
42-
pip install exasol-toolbox==1.7.3
42+
pip install exasol-toolbox==1.7.4
4343
4444
- name: Create Security Issue Report
4545
shell: bash

.github/workflows/slow-checks.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,30 @@ jobs:
5959
- int-linux-x64-4core-gpu-t4-ubuntu24.04-1
6060
- int-linux-x64-4core-ubuntu24.04-1
6161
- int-linux-x64-2core-ubuntu24.04-1
62-
name: Install Pipx on ${{ matrix.runner }}
62+
python-version:
63+
- "3.10"
64+
- "3.11"
65+
- "3.12"
66+
- "3.13"
67+
name: Install Pipx on ${{ matrix.runner }} with Python "${{ matrix.python-version }}"
6368
runs-on:
6469
labels: ${{ matrix.runner }}
6570

6671
steps:
6772
- name: SCM Checkout
6873
uses: actions/checkout@v4
6974

70-
- name: Setup Python & Poetry Environment
75+
- name: Set up Python & Poetry Environment
7176
uses: ./.github/actions/python-environment
77+
with:
78+
python-version: "${{ matrix.python-version }}"
7279

7380
- name: Poetry version
7481
run: poetry --version
82+
83+
- name: Validate Python version
84+
run: |
85+
poetry run which python
86+
poetry run python --version
87+
poetry env list
88+
poetry run python --version | grep "${{ matrix.python-version }}"

doc/changes/changelog.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/changes/changes_1.7.3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
## Bugfixes
33

44
* #523: Fixed `pipx` installation for older versions of `pip`
5+
6+
## Refactorings
7+
8+
* #525: Added tests for installing `pipx` on different GitHub runners
9+

doc/changes/changes_1.7.4.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 1.7.4 - 2025-08-06
2+
3+
This release fixes a bug in the GH action actions/python-environment where the wrong Python version was installed in the Poetry environment.
4+
5+
## Bugfixes
6+
7+
* #527: Use correct Python version in actions/python-environment

doc/changes/unreleased.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Unreleased
22

3-
## Summary
4-
5-
With the refactoring of the `dependency:audit`, we use `poetry export`. For how it can
6-
be added (project-specific or globally), see the
7-
[poetry export documentation](https://github.com/python-poetry/poetry-plugin-export).
8-
93
## Refactoring
104

11-
* #525: Added tests for installing `pipx` on different GitHub runners
125
* #517: Refactored `dependency:audit` & split up to support upcoming work

exasol/toolbox/templates/github/workflows/build-and-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919

2020
- name: Setup Python & Poetry Environment
21-
uses: exasol/python-toolbox/.github/actions/[email protected].3
21+
uses: exasol/python-toolbox/.github/actions/[email protected].4
2222

2323
- name: Build Artifacts
2424
run: poetry build

exasol/toolbox/templates/github/workflows/check-release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Setup Python & Poetry Environment
18-
uses: exasol/python-toolbox/.github/actions/[email protected].3
18+
uses: exasol/python-toolbox/.github/actions/[email protected].4
1919

2020
- name: Check Tag Version
2121
# make sure the pushed/created tag matched the project version

exasol/toolbox/templates/github/workflows/checks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fetch-depth: 0
1717

1818
- name: Setup Python & Poetry Environment
19-
uses: exasol/python-toolbox/.github/actions/[email protected].3
19+
uses: exasol/python-toolbox/.github/actions/[email protected].4
2020

2121
- name: Check Version(s)
2222
run: poetry run -- nox -s version:check
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v4
3333

3434
- name: Setup Python & Poetry Environment
35-
uses: exasol/python-toolbox/.github/actions/[email protected].3
35+
uses: exasol/python-toolbox/.github/actions/[email protected].4
3636

3737
- name: Build Documentation
3838
run: |
@@ -59,7 +59,7 @@ jobs:
5959
uses: actions/checkout@v4
6060

6161
- name: Setup Python & Poetry Environment
62-
uses: exasol/python-toolbox/.github/actions/[email protected].3
62+
uses: exasol/python-toolbox/.github/actions/[email protected].4
6363

6464
- name: Run changelog update check
6565
run: poetry run -- nox -s changelog:updated
@@ -78,7 +78,7 @@ jobs:
7878
uses: actions/checkout@v4
7979

8080
- name: Setup Python & Poetry Environment
81-
uses: exasol/python-toolbox/.github/actions/[email protected].3
81+
uses: exasol/python-toolbox/.github/actions/[email protected].4
8282
with:
8383
python-version: ${{ matrix.python-version }}
8484

@@ -109,7 +109,7 @@ jobs:
109109
uses: actions/checkout@v4
110110

111111
- name: Setup Python & Poetry Environment
112-
uses: exasol/python-toolbox/.github/actions/[email protected].3
112+
uses: exasol/python-toolbox/.github/actions/[email protected].4
113113
with:
114114
python-version: ${{ matrix.python-version }}
115115

@@ -131,7 +131,7 @@ jobs:
131131
uses: actions/checkout@v4
132132

133133
- name: Setup Python & Poetry Environment
134-
uses: exasol/python-toolbox/.github/actions/[email protected].3
134+
uses: exasol/python-toolbox/.github/actions/[email protected].4
135135
with:
136136
python-version: ${{ matrix.python-version }}
137137

@@ -155,7 +155,7 @@ jobs:
155155
uses: actions/checkout@v4
156156

157157
- name: Setup Python & Poetry Environment
158-
uses: exasol/python-toolbox/.github/actions/[email protected].3
158+
uses: exasol/python-toolbox/.github/actions/[email protected].4
159159

160160
- name: Run format check
161161
run: poetry run -- nox -s project:format
@@ -175,7 +175,7 @@ jobs:
175175
uses: actions/checkout@v4
176176

177177
- name: Setup Python & Poetry Environment
178-
uses: exasol/python-toolbox/.github/actions/[email protected].3
178+
uses: exasol/python-toolbox/.github/actions/[email protected].4
179179
with:
180180
python-version: ${{ matrix.python-version }}
181181

0 commit comments

Comments
 (0)