File tree 2 files changed +19
-16
lines changed
2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -12,25 +12,20 @@ jobs:
12
12
test :
13
13
runs-on : ubuntu-latest
14
14
15
- strategy :
16
- matrix :
17
- python-version : [3.8, 3.9, 3.10]
18
-
19
15
steps :
20
16
- name : Checkout repository
21
- uses : actions/checkout@v2
17
+ uses : actions/checkout@v4
22
18
23
- - name : Set up Python
24
- uses : actions/setup-python@v2
19
+ - name : Set up Python (latest)
20
+ uses : actions/setup-python@v4
25
21
with :
26
- python-version : ${{ matrix.python-version }}
22
+ python-version : ' latest '
27
23
28
24
- name : Install dependencies
29
25
run : |
30
26
python -m pip install --upgrade pip
31
27
pip install -r requirements.txt
32
- playwright install
28
+ playwright install --with-deps
33
29
34
30
- name : Run Playwright tests
35
- run : |
36
- pytest tests
31
+ run : pytest tests
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ setup_and_run_tests:
8
8
stage : setup_tests
9
9
image : mcr.microsoft.com/playwright/python:v1.38.0-jammy
10
10
script :
11
+ - pip install --upgrade pip
11
12
- pip install -r requirements.txt
12
13
- cp .env.example .env
13
14
- python test_dotenv.py
@@ -16,18 +17,25 @@ setup_and_run_tests:
16
17
artifacts :
17
18
paths :
18
19
- reports
20
+ expire_in : 7 days # Store artifacts for a week
19
21
when : always
22
+ cache :
23
+ paths :
24
+ - .cache/pip # Cache pip dependencies
25
+ - /ms-playwright # Cache Playwright browsers
20
26
21
27
pages :
22
28
stage : pages
23
29
script :
24
- - ls
25
- - ls reports/html
26
- - mkdir .public
27
- - cp -r reports/html/* .public
28
- - mv .public public
30
+ - ls -la
31
+ - ls -la reports/html
32
+ - mkdir -p public
33
+ - cp -r reports/html/* public/
29
34
dependencies :
30
35
- setup_and_run_tests
31
36
artifacts :
32
37
paths :
33
38
- public
39
+ expire_in : 7 days
40
+ only :
41
+ - main # Deploy only on the main branch
You can’t perform that action at this time.
0 commit comments