Skip to content

Commit a55345f

Browse files
Github Actions: Install dependencies with uv instead of pip
1 parent 236076a commit a55345f

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

.github/workflows/test.yml

+22-11
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,22 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v3
1818

19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
21+
1922
- name: Set up Python
20-
uses: actions/setup-python@v2
21-
with:
22-
python-version: '3.x'
23+
run: uv python install
2324

24-
- name: Install dependencies.
25-
run: pip install -r requirements.txt
25+
- name: Install dependencies
26+
run: |
27+
uv -q venv --allow-existing --seed .venv
28+
. .venv/bin/activate
29+
uv -q pip install -r requirements.txt
2630
2731
- name: Run ansible-lint
28-
run: "ansible-lint"
32+
run: |
33+
. .venv/bin/activate
34+
ansible-lint
2935
3036
molecule:
3137
strategy:
@@ -36,15 +42,20 @@ jobs:
3642
- name: Checkout
3743
uses: actions/checkout@v3
3844

45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v5
47+
3948
- name: Set up Python
40-
uses: actions/setup-python@v2
41-
with:
42-
python-version: '3.x'
49+
run: uv python install
4350

4451
- name: Install dependencies.
4552
run: |
46-
pip install -r requirements.txt
53+
uv -q venv --allow-existing --seed .venv
54+
. .venv/bin/activate
55+
uv -q pip install -r requirements.txt
4756
ansible-galaxy install -r requirements.yml
4857
4958
- name: Run molecule
50-
run: molecule test -p ${{ matrix.os }}
59+
run: |
60+
. .venv/bin/activate
61+
molecule test -p ${{ matrix.os }}

0 commit comments

Comments
 (0)