Skip to content
This repository was archived by the owner on Aug 14, 2026. It is now read-only.

Commit 79e854b

Browse files
committed
aadd ui tests
1 parent 862f6fa commit 79e854b

10 files changed

Lines changed: 1213 additions & 5 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main, master ]
88

99
jobs:
10-
test:
10+
unit-tests:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
@@ -26,9 +26,9 @@ jobs:
2626
python -m pip install --upgrade pip
2727
pip install -r requirements.txt
2828
29-
- name: Run tests with coverage
29+
- name: Run unit tests with coverage
3030
run: |
31-
pytest --cov=. --cov-report=term-missing --cov-report=xml
31+
pytest tests/test_*.py --cov=. --cov-report=term-missing --cov-report=xml --ignore=tests/ui
3232
3333
- name: Upload coverage reports to Codecov
3434
uses: codecov/codecov-action@v4
@@ -42,3 +42,36 @@ jobs:
4242
- name: Display coverage report
4343
run: |
4444
coverage report
45+
46+
ui-tests:
47+
runs-on: ubuntu-latest
48+
needs: unit-tests
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Set up Python 3.11
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: '3.11'
57+
58+
- name: Install dependencies
59+
run: |
60+
python -m pip install --upgrade pip
61+
pip install -r requirements.txt
62+
63+
- name: Install Playwright browsers
64+
run: |
65+
playwright install chromium --with-deps
66+
67+
- name: Run UI tests
68+
run: |
69+
pytest tests/ui/ -v --browser chromium -m ui
70+
71+
- name: Upload test artifacts on failure
72+
uses: actions/upload-artifact@v4
73+
if: failure()
74+
with:
75+
name: playwright-traces
76+
path: test-results/
77+
retention-days: 7

‎pytest.ini‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ testpaths = tests
33
python_files = test_*.py
44
python_classes = Test*
55
python_functions = test_*
6-
addopts = -v --cov=. --cov-report=term-missing --cov-report=xml
6+
addopts = -v --cov=. --cov-report=term-missing --cov-report=xml --ignore=tests/ui
77
filterwarnings =
88
ignore::DeprecationWarning
9+
markers =
10+
ui: UI tests that require Playwright (run with: pytest tests/ui -m ui)

‎requirements.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ requests==2.32.4
55
pytest>=7.4.0
66
pytest-cov>=4.1.0
77
pytest-mock>=3.12.0
8+
pytest-playwright>=0.4.0

0 commit comments

Comments
 (0)