-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (51 loc) · 1.62 KB
/
Copy pathpython-playwright.yml
File metadata and controls
60 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Python + Playwright
on:
push:
paths:
- 'projects/Python-Playwright-Automation/**'
- '.github/workflows/python-playwright.yml'
pull_request:
paths:
- 'projects/Python-Playwright-Automation/**'
- '.github/workflows/python-playwright.yml'
workflow_dispatch:
defaults:
run:
working-directory: projects/Python-Playwright-Automation
jobs:
test:
name: pytest (${{ matrix.browser }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chromium]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: projects/Python-Playwright-Automation/requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install Playwright browsers
run: playwright install --with-deps ${{ matrix.browser }}
# Functional suite only, single pass. Never load-test the practice site.
- name: Run test suite
run: |
pytest framework/tests \
--browser ${{ matrix.browser }} \
--tracing=retain-on-failure \
--html=reports/report.html --self-contained-html \
-v
- name: Upload report & traces
uses: actions/upload-artifact@v4
if: always()
with:
name: test-report-${{ matrix.browser }}
path: |
projects/Python-Playwright-Automation/reports/
projects/Python-Playwright-Automation/test-results/
retention-days: 14