From 1f6de54650dea59a7385008585e33b50389dda38 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 20 Oct 2022 08:10:34 -0300 Subject: [PATCH 1/5] Drop 'checks' job from CI This job is redundant now that we use pre-commit.ci and readthedocs builds docs for PRs. --- .github/workflows/main.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f090b7..607f6f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,34 +59,13 @@ jobs: 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 - run: | - tox -e docs - deploy: if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') runs-on: ubuntu-latest - needs: [build, checks] + needs: build steps: - uses: actions/checkout@v3 From 30d5a3037a7c665176da6957559def90e4833339 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 20 Oct 2022 08:17:57 -0300 Subject: [PATCH 2/5] Split workflows into 'deploy' and 'build' for easier management --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 26 -------------------------- 2 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fcd0ba9 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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.10" + + - 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.0 + with: + user: __token__ + password: ${{ secrets.pypi_token }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 607f6f8..b29508d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,29 +58,3 @@ jobs: - name: Test with tox run: | tox -e ${{ matrix.tox-env }}-${{ matrix.qt-lib }} -- -ra --color=yes - - deploy: - - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - - runs-on: ubuntu-latest - - needs: build - - 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 }} From 2d4e58ba5b37edf0847d4d7d0c7078d3238b8532 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 08:38:39 -0300 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Florian Bruhin --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fcd0ba9..4c0b393 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.11" - name: Build package run: | @@ -30,7 +30,7 @@ jobs: python -m build - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.5.0 + uses: pypa/gh-action-pypi-publish@v1.5.1 with: user: __token__ password: ${{ secrets.pypi_token }} From 85d187f6237386dbd8f02bf9cba17af421a9ddd4 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 08:41:08 -0300 Subject: [PATCH 4/5] Use official Python 3.11 release --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b29508d..9ce5eb9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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 From 03093fba15fb292993dd959263d8f4ce90c11475 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 08:44:06 -0300 Subject: [PATCH 5/5] Fix 3.11 reference --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ce5eb9..6093d2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: