forked from RimSort/RimSort
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.36 KB
/
pytest.yml
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
name: Run Pytest
on:
workflow_call: null
workflow_dispatch: null
permissions: {}
jobs:
pytest:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install missing Linux libs for gui tests
run: |
sudo apt-get update
sudo apt-get install -y build-essential libegl-dev libgl1 libglx-mesa0 libglib2.0-0 xvfb libxcb-cursor-dev
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-keysyms1 libxcb-shape0
shell: bash
- name: Test with pytest
run: |
pip install pytest pytest-cov pytest-qt pytest-xvfb
export QT_DEBUG_PLUGINS=1
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=app --cov-report=xml --cov-report=html -s --no-qt-log
- name: Upload pytest test results
uses: actions/upload-artifact@v4.5.0
with:
name: pytest-results
path: junit/test-results.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}