Skip to content

Commit afb3a05

Browse files
committed
Replace pipenv by uv
1 parent 104a6b7 commit afb3a05

20 files changed

+918
-1144
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
---
77
version: 2
8+
enable-beta-ecosystems: true
89
updates:
910

1011
- package-ecosystem: "github-actions"
@@ -18,7 +19,7 @@ updates:
1819
# Check for updates to GitHub Actions every weekday
1920
interval: "daily"
2021

21-
- package-ecosystem: "pip"
22+
- package-ecosystem: "uv"
2223
directory: "/"
2324
schedule:
2425
# Check for updates to pip packages every weekday

.github/workflows/gitlab.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
- name: "Check out the codebase."
5353
uses: "actions/checkout@v4"
5454
with:
55-
path: "ansible_collections/hifis/toolkit"
55+
path: "${{env.working-directory}}"
5656

5757
- name: "Prepare the job environment."
58-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
58+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5959

6060
# https://github.com/ansible/molecule/issues/3806
6161
- name: "Help molecule to find the dependencies"
6262
run: |
6363
mkdir -p /home/runner/.ansible
64-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
64+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6565
/home/runner/.ansible/roles
6666
6767
- name: "Run Molecule tests."
68-
run: "pipenv run molecule test -s gitlab"
68+
run: "uv run molecule test -s gitlab"
6969
env:
7070
MOLECULE_IMAGE: "${{ matrix.image }}"
71-
working-directory: "ansible_collections/hifis/toolkit"
71+
working-directory: "${{env.working-directory}}"

.github/workflows/gitlab_runner.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
env:
4040
PY_COLORS: 1
4141
ANSIBLE_FORCE_COLOR: 1
42+
working-directory: "${{env.working-directory}}"
4243
strategy:
4344
fail-fast: false
4445
matrix:
@@ -53,21 +54,21 @@ jobs:
5354
- name: "Check out the codebase."
5455
uses: "actions/checkout@v4"
5556
with:
56-
path: "ansible_collections/hifis/toolkit"
57+
path: "${{env.working-directory}}"
5758

5859
- name: "Prepare the job environment."
59-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
60+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
6061

6162
# https://github.com/ansible/molecule/issues/3806
6263
- name: "Help molecule to find the dependencies"
6364
run: |
6465
mkdir -p /home/runner/.ansible
65-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
66+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6667
/home/runner/.ansible/roles
6768
6869
- name: "Run Molecule tests."
69-
run: "pipenv run molecule test -s gitlab_runner"
70+
run: "uv run molecule test -s gitlab_runner"
7071
env:
7172
MOLECULE_IMAGE: "${{ matrix.image }}"
7273
AUTHENTICATION_TOKEN: "${{ secrets.authentication_token }}"
73-
working-directory: "ansible_collections/hifis/toolkit"
74+
working-directory: "${{env.working-directory}}"

.github/workflows/haproxy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ jobs:
5050
- name: "Check out the codebase."
5151
uses: "actions/checkout@v4"
5252
with:
53-
path: "ansible_collections/hifis/toolkit"
53+
path: "${{env.working-directory}}"
5454

5555
- name: "Prepare the job environment."
56-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
56+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5757

5858
# https://github.com/ansible/molecule/issues/3806
5959
- name: "Help molecule to find the dependencies"
6060
run: |
6161
mkdir -p /home/runner/.ansible
62-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
62+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6363
/home/runner/.ansible/roles
6464
6565
- name: "Run Molecule tests."
6666
# Haproxy tries to configure the nofile limit which is not allowed from within podman.
6767
# This approach increased the limit beforehand.
68-
run: "XDG_RUNTIME_DIR=/run/user/$UID pipenv run sudo prlimit --pid $$ --nofile=500000:500000 && pipenv run molecule test -s haproxy"
68+
run: "XDG_RUNTIME_DIR=/run/user/$UID uv run sudo prlimit --pid $$ --nofile=500000:500000 && uv run molecule test -s haproxy"
6969
env:
7070
MOLECULE_IMAGE: "${{ matrix.image }}"
71-
working-directory: "ansible_collections/hifis/toolkit"
71+
working-directory: "${{env.working-directory}}"

.github/workflows/keepalived.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ jobs:
4848
- name: "Check out the codebase."
4949
uses: "actions/checkout@v4"
5050
with:
51-
path: "ansible_collections/hifis/toolkit"
51+
path: "${{env.working-directory}}"
5252

5353
- name: "Prepare the job environment."
54-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
54+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5555

5656
- name: "Run Molecule tests."
57-
run: "pipenv run molecule test -s keepalived"
57+
run: "uv run molecule test -s keepalived"
5858
env:
5959
MOLECULE_IMAGE: "${{ matrix.image }}"
60-
working-directory: "ansible_collections/hifis/toolkit"
60+
working-directory: "${{env.working-directory}}"

.github/workflows/netplan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ jobs:
4848
- name: "Check out the codebase."
4949
uses: "actions/checkout@v4"
5050
with:
51-
path: "ansible_collections/hifis/toolkit"
51+
path: "${{env.working-directory}}"
5252

5353
- name: "Prepare the job environment."
54-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
54+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5555

5656
# https://github.com/ansible/molecule/issues/3806
5757
- name: "Help molecule to find the dependencies"
5858
run: |
5959
mkdir -p /home/runner/.ansible
60-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
60+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6161
/home/runner/.ansible/roles
6262
6363
- name: "Create Podman network required for testing"
6464
run: "podman network create --subnet 10.123.0.0/24 netplan_network"
6565

6666
- name: "Run Molecule tests."
67-
run: "pipenv run molecule test -s netplan"
67+
run: "uv run molecule test -s netplan"
6868
env:
6969
MOLECULE_IMAGE: "${{ matrix.image }}"
70-
working-directory: "ansible_collections/hifis/toolkit"
70+
working-directory: "${{env.working-directory}}"

.github/workflows/prepare-action/action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ description: "Install the necessary dependencies for jobs."
99
runs:
1010
using: "composite"
1111
steps:
12-
- name: "Install pipenv."
13-
run: "pipx install pipenv"
14-
shell: "bash"
12+
- name: "Install uv"
13+
uses: "astral-sh/setup-uv@v5"
14+
with:
15+
enable-cache: true
16+
cache-dependency-glob: "${{env.working-directory}}/uv.lock"
1517

1618
- name: "Set up Python 3."
1719
uses: "actions/setup-python@v5"
18-
id: "setup-python"
1920
with:
20-
python-version: "3.12"
21-
cache: "pipenv"
21+
python-version-file: "${{env.working-directory}}/.python-version"
2222

23-
- name: "Install dependencies via pipenv."
24-
run: "pipenv install --dev"
23+
- name: "Install dependencies via uv."
24+
run: "uv sync --all-extras --dev"
2525
shell: "bash"
26-
working-directory: "ansible_collections/hifis/toolkit"
26+
working-directory: "${{env.working-directory}}"

.github/workflows/redis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ jobs:
5151
- name: "Check out the codebase."
5252
uses: "actions/checkout@v4"
5353
with:
54-
path: "ansible_collections/hifis/toolkit"
54+
path: "${{env.working-directory}}"
5555

5656
- name: "Prepare the job environment."
57-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
57+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5858

5959
# https://github.com/ansible/molecule/issues/3806
6060
- name: "Help molecule to find the dependencies"
6161
run: |
6262
mkdir -p /home/runner/.ansible
63-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
63+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6464
/home/runner/.ansible/roles
6565
6666
- name: "Run Molecule tests."
67-
run: "pipenv run molecule test -s redis"
67+
run: "uv run molecule test -s redis"
6868
env:
6969
MOLECULE_IMAGE: "${{ matrix.image }}"
70-
working-directory: "ansible_collections/hifis/toolkit"
70+
working-directory: "${{env.working-directory}}"

.github/workflows/ssh_keys.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
- name: "Check out the codebase."
5353
uses: "actions/checkout@v4"
5454
with:
55-
path: "ansible_collections/hifis/toolkit"
55+
path: "${{env.working-directory}}"
5656

5757
- name: "Prepare the job environment."
58-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
58+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5959

6060
# https://github.com/ansible/molecule/issues/3806
6161
- name: "Help molecule to find the dependencies"
6262
run: |
6363
mkdir -p /home/runner/.ansible
64-
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/ansible_collections/hifis/toolkit/roles \
64+
ln -s /home/runner/work/ansible-collection-toolkit/ansible-collection-toolkit/${{env.working-directory}}/roles \
6565
/home/runner/.ansible/roles
6666
6767
- name: "Run Molecule tests."
68-
run: "pipenv run molecule test -s ssh_keys"
68+
run: "uv run molecule test -s ssh_keys"
6969
env:
7070
MOLECULE_IMAGE: "${{ matrix.image }}"
71-
working-directory: "ansible_collections/hifis/toolkit"
71+
working-directory: "${{env.working-directory}}"

.github/workflows/unattended_upgrades.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ jobs:
5050
- name: "Check out the codebase."
5151
uses: "actions/checkout@v4"
5252
with:
53-
path: "ansible_collections/hifis/toolkit"
53+
path: "${{env.working-directory}}"
5454

5555
- name: "Prepare the job environment."
56-
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
56+
uses: "${{env.working-directory}}/.github/workflows/prepare-action"
5757

5858
- name: "Run Molecule tests."
59-
run: "pipenv run molecule test -s unattended_upgrades"
59+
run: "uv run molecule test -s unattended_upgrades"
6060
env:
6161
MOLECULE_IMAGE: "${{ matrix.image }}"
62-
working-directory: "ansible_collections/hifis/toolkit"
62+
working-directory: "${{env.working-directory}}"

0 commit comments

Comments
 (0)