File tree 6 files changed +119
-871
lines changed
6 files changed +119
-871
lines changed Original file line number Diff line number Diff line change @@ -43,32 +43,22 @@ git clone https://github.com/nirtal85/Playwright-Python-Example
43
43
cd playwright-python
44
44
```
45
45
46
- ### Create and activate a virtual environment
46
+ ### Create and activate a virtual environment then Install project dependencies
47
47
48
48
#### For Windows:
49
49
``` bash
50
- py -m pip install --user virtualenv
51
- py -m venv env
50
+ pip install uv
51
+ uv venv
52
52
.\e nv\S cripts\a ctivate
53
+ uv pip sync uv.lock
53
54
```
54
55
55
56
#### For Mac:
56
57
``` 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
72
62
```
73
63
74
64
### Install playwright
Original file line number Diff line number Diff line change @@ -16,15 +16,14 @@ jobs:
16
16
uses : actions/setup-python@v5
17
17
with :
18
18
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
21
21
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
28
27
- name : Install Playwright Browsers
29
28
run : |
30
29
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')
33
32
run : |
34
33
source .venv/bin/activate
35
34
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') }}
42
35
- name : Auto-assign reviewers
43
36
44
37
if : success()
Original file line number Diff line number Diff line change @@ -40,22 +40,14 @@ jobs:
40
40
uses : actions/setup-python@v5
41
41
with :
42
42
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
45
45
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
59
51
- name : Install Playwright Browsers
60
52
run : |
61
53
PLAYWRIGHT_VERSION=$(grep -E '^playwright = "[^"]*"' pyproject.toml | sed -E 's/playwright = "([^"]*)".*$/\1/')
You can’t perform that action at this time.
0 commit comments