File tree Expand file tree Collapse file tree 2 files changed +19
-16
lines changed Expand file tree Collapse file tree 2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -12,25 +12,20 @@ jobs:
1212  test :
1313    runs-on : ubuntu-latest 
1414
15-     strategy :
16-       matrix :
17-         python-version : [3.8, 3.9, 3.10] 
18- 
1915    steps :
2016      - name : Checkout repository 
21-         uses : actions/checkout@v2  
17+         uses : actions/checkout@v4  
2218
23-       - name : Set up Python 
24-         uses : actions/setup-python@v2  
19+       - name : Set up Python (latest)  
20+         uses : actions/setup-python@v4  
2521        with :
26-           python-version : ${{ matrix.python-version }} 
22+           python-version : ' latest ' 
2723
2824      - name : Install dependencies 
2925        run : | 
3026          python -m pip install --upgrade pip 
3127          pip install -r requirements.txt 
32-           playwright install 
28+           playwright install --with-deps  
3329
3430name : 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:
88  stage : setup_tests 
99  image : mcr.microsoft.com/playwright/python:v1.38.0-jammy 
1010  script :
11+     - pip install --upgrade pip 
1112    - pip install -r requirements.txt 
1213    - cp .env.example .env 
1314    - python test_dotenv.py 
@@ -16,18 +17,25 @@ setup_and_run_tests:
1617  artifacts :
1718    paths :
1819      - reports 
20+     expire_in : 7 days   #  Store artifacts for a week
1921    when : always 
22+   cache :
23+     paths :
24+       - .cache/pip   #  Cache pip dependencies
25+       - /ms-playwright   #  Cache Playwright browsers
2026
2127pages :
2228  stage : pages 
2329  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/ 
2934  dependencies :
3035    - setup_and_run_tests 
3136  artifacts :
3237    paths :
3338      - 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