Skip to content

Commit e36efc3

Browse files
authored
Merge pull request #194 from nirtal85/uv
uv
2 parents 081587a + 18a120e commit e36efc3

File tree

6 files changed

+119
-871
lines changed

6 files changed

+119
-871
lines changed

.github/README.md

+8-18
Original file line numberDiff line numberDiff line change
@@ -43,32 +43,22 @@ git clone https://github.com/nirtal85/Playwright-Python-Example
4343
cd playwright-python
4444
```
4545

46-
### Create and activate a virtual environment
46+
### Create and activate a virtual environment then Install project dependencies
4747

4848
#### For Windows:
4949
```bash
50-
py -m pip install --user virtualenv
51-
py -m venv env
50+
pip install uv
51+
uv venv
5252
.\env\Scripts\activate
53+
uv pip sync uv.lock
5354
```
5455

5556
#### For Mac:
5657
```bash
57-
python3 -m pip install --user virtualenv
58-
python3 -m venv venv
59-
source venv/bin/activate
60-
```
61-
62-
### Install Poetry
63-
64-
```bash
65-
pip install poetry
66-
```
67-
68-
### Install Project Dependencies
69-
70-
```bash
71-
poetry install --no-root
58+
python3 -m pip install uv
59+
uv venv
60+
source .venv/bin/activate
61+
uv pip sync uv.lock
7262
```
7363

7464
### Install playwright

.github/workflows/devRun.yml

+7-14
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.13'
19-
- name: Install Poetry
20-
uses: snok/install-poetry@v1
19+
- name: Set up uv
20+
uses: astral-sh/setup-uv@v5
2121
with:
22-
virtualenvs-create: true
23-
virtualenvs-in-project: true
24-
installer-parallel: true
25-
virtualenvs-path: .venv
26-
- name: Install Dependencies
27-
run: poetry install --no-interaction --no-root
22+
enable-cache: true
23+
- name: Create venv & install dependencies
24+
run: |
25+
uv venv
26+
uv pip sync uv.lock
2827
- name: Install Playwright Browsers
2928
run: |
3029
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')
@@ -33,12 +32,6 @@ jobs:
3332
run: |
3433
source .venv/bin/activate
3534
xvfb-run pytest -m devRun --base-url ${{ vars.BASE_URL }}
36-
- name: Cache dependencies if tests pass
37-
if: success()
38-
uses: actions/cache/save@v4
39-
with:
40-
path: .venv
41-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
4235
- name: Auto-assign reviewers
4336
uses: kentaro-m/[email protected]
4437
if: success()

.github/workflows/nightly.yml

+7-15
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,14 @@ jobs:
4040
uses: actions/setup-python@v5
4141
with:
4242
python-version: '3.13'
43-
- name: Install Poetry
44-
uses: snok/install-poetry@v1
43+
- name: Set up uv
44+
uses: astral-sh/setup-uv@v5
4545
with:
46-
virtualenvs-create: true
47-
virtualenvs-in-project: true
48-
installer-parallel: true
49-
virtualenvs-path: .venv
50-
- name: Load cached venv
51-
id: cached-poetry-dependencies
52-
uses: actions/cache@v4
53-
with:
54-
path: .venv
55-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
56-
- name: Install Dependencies
57-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
58-
run: poetry install --no-interaction --no-root
46+
enable-cache: true
47+
- name: Create venv & install dependencies
48+
run: |
49+
uv venv
50+
uv pip sync uv.lock
5951
- name: Install Playwright Browsers
6052
run: |
6153
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')

0 commit comments

Comments
 (0)