Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI workflow improvements #461

Merged
merged 5 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: deploy

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:

deploy:
if: github.repository == 'pytest-dev/pytest-qt'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"

- name: Build package
run: |
python -m pip install --upgrade pip
pip install build
python -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
password: ${{ secrets.pypi_token }}
55 changes: 4 additions & 51 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false

matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
qt-lib: [pyqt5, pyqt6, pyside2, pyside6]
os: [ubuntu-20.04, windows-latest, macos-latest]
include:
Expand All @@ -22,7 +22,7 @@ jobs:
tox-env: "py39"
- python-version: "3.10"
tox-env: "py310"
- python-version: "3.11-dev"
- python-version: "3.11"
tox-env: "py311"
# https://bugreports.qt.io/browse/PYSIDE-1797
exclude:
Expand All @@ -34,10 +34,10 @@ jobs:
python-version: "3.7"
# Not installable so far
- qt-lib: pyside6
python-version: "3.11-dev"
python-version: "3.11"
- qt-lib: pyside2
os: windows-latest
python-version: "3.11-dev"
python-version: "3.11"

steps:
- uses: actions/checkout@v3
Expand All @@ -58,50 +58,3 @@ jobs:
- name: Test with tox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're at it, maybe change 3.11-dev to 3.11 above (released now), and also re-check if pyside6 works on it nowadays?

run: |
tox -e ${{ matrix.tox-env }}-${{ matrix.qt-lib }} -- -ra --color=yes

checks:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Linting
run: |
tox -e linting
- name: Docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really have a check failing the PR status from RTD, if a PR breaks the docs? Scrolling through the commit status list of this PR, I can't seem to find any?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I have re-synced the webhook from RTD and is now working again:

image

run: |
tox -e docs

deploy:

if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

runs-on: ubuntu-latest

needs: [build, checks]

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Build package
run: |
python -m pip install --upgrade pip setuptools
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.pypi_token }}