Skip to content

Commit 7029186

Browse files
Fix: Install uv in virtual environments and improve shell compatibility
Co-Authored-By: [email protected] <[email protected]>
1 parent 327d2e9 commit 7029186

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

.github/workflows/python-ci.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,78 +26,85 @@ jobs:
2626
if: runner.os != 'Windows'
2727
shell: bash
2828
run: |
29+
python -m pip install --upgrade pip
2930
python -m pip install uv
31+
uv --version
3032
- name: Install uv (Windows)
3133
if: runner.os == 'Windows'
3234
shell: bash
3335
run: |
36+
python -m pip install --upgrade pip
3437
python -m pip install uv
38+
uv --version
3539
- name: selfie-lib - install dependencies
3640
shell: bash
3741
run: |
38-
python -m uv venv
39-
source .venv/bin/activate || source .venv/Scripts/activate
40-
python -m uv pip install -r requirements.txt -r dev-requirements.txt
42+
uv venv
43+
. .venv/bin/activate || . .venv/Scripts/activate
44+
python -m pip install uv
45+
uv pip install -r requirements.txt -r dev-requirements.txt
4146
working-directory: python/selfie-lib
4247
- name: selfie-lib - pytest
4348
shell: bash
4449
run: |
45-
source .venv/bin/activate || source .venv/Scripts/activate
50+
. .venv/bin/activate || . .venv/Scripts/activate
4651
python -m pytest -vv
4752
working-directory: python/selfie-lib
4853
- name: selfie-lib - pyright
4954
shell: bash
5055
run: |
51-
source .venv/bin/activate || source .venv/Scripts/activate
56+
. .venv/bin/activate || . .venv/Scripts/activate
5257
python -m pyright
5358
working-directory: python/selfie-lib
5459
- name: selfie-lib - ruff
5560
shell: bash
5661
run: |
57-
source .venv/bin/activate || source .venv/Scripts/activate
62+
. .venv/bin/activate || . .venv/Scripts/activate
5863
python -m ruff format --check && python -m ruff check
5964
working-directory: python/selfie-lib
6065
- name: pytest-selfie - install dependencies
6166
shell: bash
6267
run: |
63-
python -m uv venv
64-
source .venv/bin/activate || source .venv/Scripts/activate
65-
python -m uv pip install -r requirements.txt -r dev-requirements.txt
68+
uv venv
69+
. .venv/bin/activate || . .venv/Scripts/activate
70+
python -m pip install uv
71+
uv pip install -r requirements.txt -r dev-requirements.txt
6672
working-directory: python/pytest-selfie
6773
- name: pytest-selfie - pyright
6874
shell: bash
6975
run: |
70-
source .venv/bin/activate || source .venv/Scripts/activate
76+
. .venv/bin/activate || . .venv/Scripts/activate
7177
python -m pyright
7278
working-directory: python/pytest-selfie
7379
- name: pytest-selfie - ruff
7480
shell: bash
7581
run: |
76-
source .venv/bin/activate || source .venv/Scripts/activate
82+
. .venv/bin/activate || . .venv/Scripts/activate
7783
python -m ruff format --check && python -m ruff check
7884
working-directory: python/pytest-selfie
7985
- name: example-pytest-selfie - install dependencies
8086
shell: bash
8187
run: |
82-
python -m uv venv
83-
source .venv/bin/activate || source .venv/Scripts/activate
84-
python -m uv pip install -r requirements.txt -r dev-requirements.txt
88+
uv venv
89+
. .venv/bin/activate || . .venv/Scripts/activate
90+
python -m pip install uv
91+
uv pip install -r requirements.txt -r dev-requirements.txt
8592
working-directory: python/example-pytest-selfie
8693
- name: example-pytest-selfie - pytest
8794
shell: bash
8895
run: |
89-
source .venv/bin/activate || source .venv/Scripts/activate
96+
. .venv/bin/activate || . .venv/Scripts/activate
9097
python -m pytest -vv
9198
working-directory: python/example-pytest-selfie
9299
- name: example-pytest-selfie - pyright
93100
shell: bash
94101
run: |
95-
source .venv/bin/activate || source .venv/Scripts/activate
102+
. .venv/bin/activate || . .venv/Scripts/activate
96103
python -m pyright
97104
working-directory: python/example-pytest-selfie
98105
- name: example-pytest-selfie - ruff
99106
shell: bash
100107
run: |
101-
source .venv/bin/activate || source .venv/Scripts/activate
108+
. .venv/bin/activate || . .venv/Scripts/activate
102109
python -m ruff format --check && python -m ruff check
103110
working-directory: python/example-pytest-selfie

0 commit comments

Comments
 (0)