Skip to content

Switch to pyside6

Switch to pyside6 #50

# from https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "setup.cfg"
- name: Install Qt dependencies
run: |
# from https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest-xvfb black
python -m pip install -e .[test,PyQt5]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude example
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude example
- name: Lint with black
run: |
black --check .
- name: Test with pytest
run: |
pytest -vv --cov-report xml
- name: Codecov Upload
uses: codecov/codecov-action@v2.1.0
with:
file: coverage.xml