File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ # Inspired from https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
5+
6+ name : Python package
7+
8+ on :
9+ push :
10+ branches : [ "master" ]
11+ pull_request :
12+ branches : [ "master" ]
13+
14+ jobs :
15+ build :
16+
17+ env :
18+ DISPLAY : ' :99.0'
19+
20+ runs-on : ubuntu-latest
21+ strategy :
22+ fail-fast : false
23+ matrix :
24+ python-version : ["3.8", "3.9", "3.10", "3.11"]
25+
26+ steps :
27+ - uses : actions/checkout@v3
28+ - name : Set up Python ${{ matrix.python-version }}
29+ uses : actions/setup-python@v3
30+ with :
31+ python-version : ${{ matrix.python-version }}
32+ - name : Install dependencies
33+ run : |
34+ sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
35+ /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
36+ python -m pip install --upgrade pip
37+ python -m pip install flake8 pytest
38+ pip install PyQt5
39+ pip install .
40+ - name : Lint with flake8
41+ run : |
42+ # stop the build if there are Python syntax errors or undefined names
43+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
44+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
45+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
46+ - name : Test with pytest
47+ run : |
48+ PythonQwt-tests --mode unattended
You can’t perform that action at this time.
0 commit comments