Skip to content

Commit 0fa9e78

Browse files
authored
ci pip-compile: specify the correct Python version for each branch (#2304)
CI jobs for stable-2.18 and stable-2.17 were failing before this; they use a different Python version for lockfile generation that was not incidentally installed like Python 3.11.
1 parent 538390d commit 0fa9e78

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/pip-compile-dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,39 @@ jobs:
2727
'pip-compile(static)'
2828
'pip-compile(spelling)'
2929
'pip-compile(tag)'
30+
python-versions: "3.11"
3031
- base-branch: stable-2.18
3132
pr-branch: pip-compile/stable-2.18/dev
3233
nox-args: >-
3334
-e 'pip-compile(formatters)'
3435
'pip-compile(typing)'
3536
'pip-compile(static)'
3637
'pip-compile(spelling)'
38+
python-versions: "3.11"
3739
- base-branch: stable-2.17
3840
pr-branch: pip-compile/stable-2.17/dev
3941
nox-args: >-
4042
-e 'pip-compile(formatters)'
4143
'pip-compile(typing)'
4244
'pip-compile(static)'
4345
'pip-compile(spelling)'
46+
python-versions: "3.10"
4447
- base-branch: stable-2.16
4548
pr-branch: pip-compile/stable-2.16/dev
4649
nox-args: >-
4750
-e 'pip-compile(formatters)'
4851
'pip-compile(typing)'
4952
'pip-compile(static)'
5053
'pip-compile(spelling)'
54+
python-versions: "3.10"
5155
name: "Refresh dev dependencies"
5256
uses: ./.github/workflows/reusable-pip-compile.yml
5357
with:
5458
message: "ci: refresh dev dependencies"
5559
base-branch: "${{ matrix.base-branch }}"
5660
pr-branch: "${{ matrix.pr-branch }}"
5761
nox-args: "${{ matrix.nox-args }}"
62+
python-versions: "${{ matrix.python-versions }}"
5863
reset-branch: "${{ inputs.reset-branch || false }}"
5964
labels: "${{ inputs.labels || 'no_backport,tooling' }}"
6065
secrets: inherit

.github/workflows/pip-compile-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ jobs:
3333
'pip-compile(requirements-relaxed)'
3434
reset-branch: "${{ inputs.reset-branch || false }}"
3535
labels: "${{ inputs.labels || 'doc builds,no_backport' }}"
36+
python-versions: "3.11"
3637
secrets: inherit

.github/workflows/reusable-pip-compile.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ name: "Refresh pinned dependencies"
3232
labels:
3333
type: string
3434
default: ""
35+
python-versions:
36+
type: string
37+
required: true
3538
jobs:
3639
refresh:
3740
runs-on: ubuntu-latest
@@ -55,7 +58,7 @@ jobs:
5558
- name: Set up nox
5659
uses: wntrblm/[email protected]
5760
with:
58-
python-versions: "3.9"
61+
python-versions: "${{ inputs.python-versions }}"
5962
- name: Set up git committer
6063
run: |
6164
hacking/get_bot_user.sh "ansible-documentation-bot" "Ansible Documentation Bot"

0 commit comments

Comments
 (0)