Skip to content

Commit 9db05d0

Browse files
CI workflow improvements (#461)
* Drop 'checks' job from CI: this job is redundant now that we use pre-commit.ci and readthedocs builds docs for PRs. * Split workflows into 'deploy' and 'build' for easier management * Use official Python 3.11 release Co-authored-by: Florian Bruhin <[email protected]>
1 parent 8e99500 commit 9db05d0

File tree

2 files changed

+40
-51
lines changed

2 files changed

+40
-51
lines changed

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
10+
deploy:
11+
if: github.repository == 'pytest-dev/pytest-qt'
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: false
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: "3.11"
25+
26+
- name: Build package
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build
30+
python -m build
31+
32+
- name: Publish package to PyPI
33+
uses: pypa/[email protected]
34+
with:
35+
user: __token__
36+
password: ${{ secrets.pypi_token }}

.github/workflows/main.yml

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111

1212
matrix:
13-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
13+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1414
qt-lib: [pyqt5, pyqt6, pyside2, pyside6]
1515
os: [ubuntu-20.04, windows-latest, macos-latest]
1616
include:
@@ -22,7 +22,7 @@ jobs:
2222
tox-env: "py39"
2323
- python-version: "3.10"
2424
tox-env: "py310"
25-
- python-version: "3.11-dev"
25+
- python-version: "3.11"
2626
tox-env: "py311"
2727
# https://bugreports.qt.io/browse/PYSIDE-1797
2828
exclude:
@@ -34,10 +34,10 @@ jobs:
3434
python-version: "3.7"
3535
# Not installable so far
3636
- qt-lib: pyside6
37-
python-version: "3.11-dev"
37+
python-version: "3.11"
3838
- qt-lib: pyside2
3939
os: windows-latest
40-
python-version: "3.11-dev"
40+
python-version: "3.11"
4141

4242
steps:
4343
- uses: actions/checkout@v3
@@ -58,50 +58,3 @@ jobs:
5858
- name: Test with tox
5959
run: |
6060
tox -e ${{ matrix.tox-env }}-${{ matrix.qt-lib }} -- -ra --color=yes
61-
62-
checks:
63-
64-
runs-on: ubuntu-latest
65-
66-
steps:
67-
- uses: actions/checkout@v3
68-
- name: Set up Python
69-
uses: actions/setup-python@v3
70-
with:
71-
python-version: "3.7"
72-
- name: Install tox
73-
run: |
74-
python -m pip install --upgrade pip
75-
pip install tox
76-
- name: Linting
77-
run: |
78-
tox -e linting
79-
- name: Docs
80-
run: |
81-
tox -e docs
82-
83-
deploy:
84-
85-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
86-
87-
runs-on: ubuntu-latest
88-
89-
needs: [build, checks]
90-
91-
steps:
92-
- uses: actions/checkout@v3
93-
- name: Set up Python
94-
uses: actions/setup-python@v3
95-
with:
96-
python-version: "3.7"
97-
- name: Build package
98-
run: |
99-
python -m pip install --upgrade pip setuptools
100-
pip install wheel
101-
python setup.py sdist bdist_wheel
102-
- name: Publish package to PyPI
103-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
104-
uses: pypa/[email protected]
105-
with:
106-
user: __token__
107-
password: ${{ secrets.pypi_token }}

0 commit comments

Comments
 (0)