Bugfix/file manager context menu items missing #1071
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python Tests | |
on: | |
push: | |
branches: | |
- main | |
- 'release/**' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 14 | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
[ | |
# latest conan 1.X on U20 and Windows | |
"u20-py38-conan1-latest", | |
"u20-py39-conan1-latest", | |
"u20-py310-conan1-latest", | |
"win-py311-conan1-latest", | |
# conan minimum version with python minimum version | |
"u20-py38-conan1.48", | |
# conan 2 stuff with bleeding edge - use Python 3.12 (U22 needed) | |
"u22-py310-conan2.3", # 2.3 API changes | |
"u22-py312-conan2-latest", # post 2.3 API changes | |
"win-py312-conan2-latest", # latest everything | |
] | |
include: | |
- name: "u20-py38-conan1-latest" | |
python: "3.8" | |
os: ubuntu-20.04 | |
conan: "<2" | |
conan_server: "<2" | |
pytest_args: "" | |
- name: "u20-py39-conan1-latest" | |
python: "3.9" | |
conan: "<2" | |
conan_server: "<2" | |
os: ubuntu-20.04 | |
pytest_args: "" | |
- name: "u20-py310-conan1-latest" | |
python: "3.10" | |
conan: "<2" | |
conan_server: "<2" | |
os: ubuntu-20.04 | |
pytest_args: "" | |
- name: "win-py311-conan1-latest" | |
python: "3.11" | |
os: windows-latest | |
conan: "<2" | |
conan_server: "<2" | |
pytest_args: "" | |
- name: "u20-py38-conan1.48" | |
python: "3.8" | |
os: ubuntu-20.04 | |
conan: "==1.48.0" | |
conan_server: "==1.48.0" | |
pytest_args: "" | |
- name: "u22-py310-conan2.3" | |
python: "3.10" | |
os: ubuntu-22.04 | |
conan: <2.4 | |
conan_server: "-server <2.4" | |
pytest_args: "-m conanv2" | |
- name: "u22-py312-conan2-latest" | |
python: "3.12" | |
os: ubuntu-22.04 | |
conan: <2.8 | |
conan_server: "-server <2.8" | |
pytest_args: "-m conanv2" | |
- name: win-py312-conan2-latest | |
python: "3.12" | |
os: windows-latest | |
conan: <2.8 # latest conan 2 | |
conan_server: "-server <2.8" | |
pytest_args: "-m conanv2" | |
env: | |
DISPLAY: ":99.0" | |
LC_ALL: "en_US.UTF-8" | |
CONAN_REVISIONS_ENABLED: 1 | |
CAL_DEBUG_LEVEL: 2 # this does not use Qt Threads, but enables to see stacktraces | |
# QT_LOGGING_RULES=: "*.debug=true" | |
# QT_DEBUG_PLUGINS: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' # caching pip dependencies | |
cache-dependency-path: pyproject.toml | |
######### Ubuntu 20.04 ######### | |
- name: Set up a virtual display for GUI on Ubuntu 20 | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt update | |
sudo apt install libegl1-mesa libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \ | |
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 \ | |
libxcb-xfixes0 libxcb-shape0 | |
/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 | |
- name: Install system dependencies for testing on Ubuntu 20 | |
if: matrix.os == 'ubuntu-20.04' | |
run: | # terminal, file manager, xwininfo, text-editor | |
sudo apt install lxterminal nautilus x11-utils mousepad xdg-utils | |
sudo apt install dbus-x11 at-spi2-core | |
pip install PySide6-Essentials==6.4.3 | |
######### Ubuntu 22.04 ######### | |
- name: Set up a virtual display for GUI on Ubuntu 22 | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
sudo apt update | |
sudo apt install xvfb libegl1-mesa libxkbcommon-x11-0 '^libxcb.*' | |
/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 | |
# apt-get install -y libglib2.0-0 libsm6 libxrender1 libxext6 | |
- name: Install system dependencies for testing on Ubuntu 22 | |
if: matrix.os == 'ubuntu-22.04' | |
run: | # terminal, file manager, xwininfo, text-editor | |
sudo apt install lxterminal nautilus x11-utils mousepad xdg-utils | |
sudo apt install dbus-x11 at-spi2-core | |
sudo apt install qt6-wayland | |
######### Platform specifics end ######### | |
- name: Install specific Conan version | |
run: | # markupsafe is a workaround fix for broken conan dependencies | |
pip install markupsafe==2.0.1 --use-pep517 | |
pip install "conan${{ matrix.conan }}" --use-pep517 | |
pip install "conan${{ matrix.conan_server }}" --use-pep517 | |
- name: Install own package and test dependencies | |
# need -e because of coverage paths. | |
run: | | |
pip install -e .[test] | |
- name: Execute unitests with pytest | |
run: >- | |
pytest -v test/01_unit --junit-xml=./results/result-unit-${{matrix.name}}.xml | |
--cov=conan_explorer --cov-branch --cov-append --capture=no ${{matrix.pytest_args}} | |
- name: Execute integration with pytest | |
env: | |
SKIP_CREATE_CONAN_TEST_DATA: True | |
run: >- | |
pytest -v test/02_integration --junit-xml=./results/result-integration-${{matrix.name}}.xml | |
--cov=conan_explorer --cov-branch --cov-append --capture=no ${{matrix.pytest_args}} | |
- name: Execute system with pytest # Reinstall into site-packages to find install and pkg problems | |
env: | |
SKIP_CREATE_CONAN_TEST_DATA: True | |
run: >- | |
pytest -v test/03_system --junit-xml=./results/result-system-${{matrix.name}}.xml | |
--cov-report xml:cov/cov-${{matrix.name}}.xml --cov=conan_explorer --cov-branch --cov-append ${{matrix.pytest_args}} | |
- name: Upload Test results | |
uses: actions/upload-artifact@v3 # TODO: v4 does not support overwrite anymore | |
with: | |
name: Test results | |
path: | | |
cov/ | |
results/ | |
sonarcloud: | |
if: always() # execute, even when tests fail | |
needs: | |
- test | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting, | |
# cf https://sonarcloud.io/project/configuration?analysisMode=GitHubActions | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: Test results | |
path: ./ | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.organization=goszpeti | |
-Dsonar.projectKey=goszpeti_conan_explorer | |
-Dsonar.sources=./src | |
-Dsonar.exclusions=**/*_ui.py | |
-Dsonar.tests=./test | |
-Dsonar.sourceEncoding=UTF-8 | |
-Dsonar.python.version=3.8,3.9,3.10,3.11 | |
-Dsonar.python.coverage.reportPaths=cov/cov-*.xml | |
-Dsonar.python.xunit.reportPath=results/result-*-ubuntu-py39.xml |