Skip to content

Merge pull request #16 from matsjoyce-refeyn/add-qt-610-support #80

Merge pull request #16 from matsjoyce-refeyn/add-qt-610-support

Merge pull request #16 from matsjoyce-refeyn/add-qt-610-support #80

Workflow file for this run

name: Test, build and deploy
on:
workflow_dispatch:
pull_request:
push:
tags:
- '*'
branches:
- master
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
pyside6_version: [6.9.3]
include:
- os: ubuntu-latest
pyside6_version: 6.8.3
- os: ubuntu-latest
pyside6_version: 6.9.3
build_wheel: true
# Does not work on Qt 6.10 on Linux and MacOS due to https://bugreports.qt.io/browse/PYSIDE-3241
# - os: ubuntu-latest
# pyside6_version: 6.10.0
- os: windows-latest
pyside6_version: 6.10.0
runs-on: ${{ matrix.os }}
name: "Test on ${{ matrix.os }} with PySide6 ${{ matrix.pyside6_version }}"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install -y libegl1-mesa-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
echo "PySide6==${{ matrix.pyside6_version }}" > constraint.txt
pip install -r requirements.txt -c constraint.txt
hatch build --hooks-only
- name: Check formatting with black
run: |
black --check .
- name: Type check with mypy
run: |
mypy pyside6_qml_stubgen tests --exclude tests/target
- name: Test with pytest
run: |
pytest
- name: Build wheel
if: matrix.build_wheel == true
run: |
python -m build
- name: Upload wheels
if: matrix.build_wheel == true
uses: actions/upload-artifact@v4
with:
name: pyside6-qml-stubgen-wheel
path: dist/*
upload-pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/pyside6-qml-stubgen
permissions:
id-token: write
concurrency:
group: "deploy-pypi"
cancel-in-progress: false
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: pyside6-qml-stubgen-wheel
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1