Skip to content

Commit 60d2be1

Browse files
authored
Merge pull request #406 from tobiashuste/switch-to-uv
Replace pipenv by uv
2 parents 104a6b7 + 2a7e776 commit 60d2be1

20 files changed

+906
-1128
lines changed

.github/dependabot.yml

+2-1
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: "Check out the codebase."
5353
uses: "actions/checkout@v4"
5454
with:
55-
path: "ansible_collections/hifis/toolkit"
55+
path: "./ansible_collections/hifis/toolkit"
5656

5757
- name: "Prepare the job environment."
5858
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -65,7 +65,7 @@ jobs:
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: "./ansible_collections/hifis/toolkit"

.github/workflows/gitlab_runner.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: "Check out the codebase."
5454
uses: "actions/checkout@v4"
5555
with:
56-
path: "ansible_collections/hifis/toolkit"
56+
path: "./ansible_collections/hifis/toolkit"
5757

5858
- name: "Prepare the job environment."
5959
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -66,8 +66,8 @@ jobs:
6666
/home/runner/.ansible/roles
6767
6868
- name: "Run Molecule tests."
69-
run: "pipenv run molecule test -s gitlab_runner"
69+
run: "uv run molecule test -s gitlab_runner"
7070
env:
7171
MOLECULE_IMAGE: "${{ matrix.image }}"
7272
AUTHENTICATION_TOKEN: "${{ secrets.authentication_token }}"
73-
working-directory: "ansible_collections/hifis/toolkit"
73+
working-directory: "./ansible_collections/hifis/toolkit"

.github/workflows/haproxy.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: "Check out the codebase."
5151
uses: "actions/checkout@v4"
5252
with:
53-
path: "ansible_collections/hifis/toolkit"
53+
path: "./ansible_collections/hifis/toolkit"
5454

5555
- name: "Prepare the job environment."
5656
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -65,7 +65,7 @@ jobs:
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: "./ansible_collections/hifis/toolkit"

.github/workflows/keepalived.yml

+3-3
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: "./ansible_collections/hifis/toolkit"
5252

5353
- name: "Prepare the job environment."
5454
uses: "./ansible_collections/hifis/toolkit/.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: "./ansible_collections/hifis/toolkit"

.github/workflows/netplan.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: "Check out the codebase."
4949
uses: "actions/checkout@v4"
5050
with:
51-
path: "ansible_collections/hifis/toolkit"
51+
path: "./ansible_collections/hifis/toolkit"
5252

5353
- name: "Prepare the job environment."
5454
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -64,7 +64,7 @@ jobs:
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: "./ansible_collections/hifis/toolkit"

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

+14-9
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ description: "Install the necessary dependencies for jobs."
99
runs:
1010
using: "composite"
1111
steps:
12-
- name: "Install pipenv."
13-
run: "pipx install pipenv"
12+
- name: "Configure UV_PYTHON variable"
13+
run: 'echo "UV_PYTHON=$(cat .python-version)" >> $GITHUB_ENV'
1414
shell: "bash"
15+
working-directory: "./ansible_collections/hifis/toolkit/"
1516

16-
- name: "Set up Python 3."
17+
- name: "Set up Python 3.x"
1718
uses: "actions/setup-python@v5"
18-
id: "setup-python"
1919
with:
20-
python-version: "3.12"
21-
cache: "pipenv"
20+
python-version-file: "./ansible_collections/hifis/toolkit/.python-version"
2221

23-
- name: "Install dependencies via pipenv."
24-
run: "pipenv install --dev"
22+
- name: "Install uv"
23+
uses: "astral-sh/setup-uv@v5"
24+
with:
25+
enable-cache: true
26+
cache-dependency-glob: "./ansible_collections/hifis/toolkit/uv.lock"
27+
28+
- name: "Install dependencies via uv."
29+
run: "uv sync --frozen"
2530
shell: "bash"
26-
working-directory: "ansible_collections/hifis/toolkit"
31+
working-directory: "./ansible_collections/hifis/toolkit"

.github/workflows/redis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: "Check out the codebase."
5252
uses: "actions/checkout@v4"
5353
with:
54-
path: "ansible_collections/hifis/toolkit"
54+
path: "./ansible_collections/hifis/toolkit"
5555

5656
- name: "Prepare the job environment."
5757
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -64,7 +64,7 @@ jobs:
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: "./ansible_collections/hifis/toolkit"

.github/workflows/ssh_keys.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: "Check out the codebase."
5353
uses: "actions/checkout@v4"
5454
with:
55-
path: "ansible_collections/hifis/toolkit"
55+
path: "./ansible_collections/hifis/toolkit"
5656

5757
- name: "Prepare the job environment."
5858
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -65,7 +65,7 @@ jobs:
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: "./ansible_collections/hifis/toolkit"

.github/workflows/unattended_upgrades.yml

+3-3
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: "./ansible_collections/hifis/toolkit"
5454

5555
- name: "Prepare the job environment."
5656
uses: "./ansible_collections/hifis/toolkit/.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: "./ansible_collections/hifis/toolkit"

.github/workflows/zammad.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: "Check out the codebase."
4949
uses: "actions/checkout@v4"
5050
with:
51-
path: "ansible_collections/hifis/toolkit"
51+
path: "./ansible_collections/hifis/toolkit"
5252

5353
- name: "Prepare the job environment."
5454
uses: "./ansible_collections/hifis/toolkit/.github/workflows/prepare-action"
@@ -61,7 +61,7 @@ jobs:
6161
/home/runner/.ansible/roles
6262
6363
- name: "Run Molecule tests."
64-
run: "XDG_RUNTIME_DIR=/run/user/$UID pipenv run molecule test -s zammad"
64+
run: "XDG_RUNTIME_DIR=/run/user/$UID uv run molecule test -s zammad"
6565
env:
6666
MOLECULE_IMAGE: "${{ matrix.image }}"
67-
working-directory: "ansible_collections/hifis/toolkit"
67+
working-directory: "./ansible_collections/hifis/toolkit"

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
*~
99
*.log
1010
.idea/
11-
.pipenv/
11+
.venv/
1212
.vscode/

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13
File renamed without changes.

CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ After cloning the project locally the _Python_ dependencies need to be
119119
installed:
120120

121121
```shell
122-
$ pipenv install --dev
122+
uv sync --frozen
123123
```
124124

125125
As mentioned in the suggested contribution workflow above, linting and testing
@@ -138,7 +138,7 @@ and
138138
[yamllint rules](https://yamllint.readthedocs.io/en/stable/rules.html):
139139

140140
```shell
141-
$ pipenv run ansible-lint --offline
141+
uv run ansible-lint --offline
142142
```
143143

144144
### REUSE Specification Compliance
@@ -149,7 +149,7 @@ copyright information and that it thereby meets the
149149
[REUSE Specification](https://reuse.software/spec/):
150150

151151
```shell
152-
$ pipenv run reuse lint
152+
uv run reuse lint
153153
```
154154

155155
### Testing the Ansible Collection
@@ -161,7 +161,7 @@ the existing automated test cases to verify that your changes do not break
161161
existing test cases:
162162

163163
```shell
164-
$ pipenv run molecule test -s unattended_upgrades
164+
uv run molecule test -s unattended_upgrades
165165
```
166166

167167
## How are Contributors Given Credit for Their Valuable Work?

Pipfile

-23
This file was deleted.

0 commit comments

Comments
 (0)