11name : check
22on :
33 push :
4+ tags-ignore : ["**"]
45 pull_request :
56 schedule :
67 - cron : " 0 8 * * *"
@@ -11,108 +12,66 @@ concurrency:
1112
1213jobs :
1314 test :
14- name : test ${{ matrix.py }} - ${{ matrix.os }}
15- runs-on : ${{ matrix.os }}
15+ name : test on CPython ${{ matrix.py }}
16+ runs-on : ubuntu-latest
1617 strategy :
1718 fail-fast : false
1819 matrix :
1920 py :
21+ - " 3.12.0-beta.2"
2022 - " 3.11"
2123 - " 3.10"
22- - " pypy-3.7-v7.3.7" # ahead to start it earlier because takes longer
23- - " 3.9"
24- - " 3.8"
25- - " 3.7"
26- os :
27- - ubuntu-22.04
28- - windows-2022
29- - macos-12
30-
24+ - 3.9
25+ - 3.8
26+ - 3.7
3127 steps :
32- - name : Setup python for tox
28+ - name : setup python for tox
3329 uses : actions/setup-python@v4
3430 with :
3531 python-version : " 3.11"
36- - name : Install tox
32+ - name : install tox
3733 run : python -m pip install tox
3834 - uses : actions/checkout@v3
39- with :
40- fetch-depth : 0
41- - name : Setup python for test ${{ matrix.py }}
35+ - name : setup python for test ${{ matrix.py }}
4236 uses : actions/setup-python@v4
4337 with :
4438 python-version : ${{ matrix.py }}
4539 - name : Pick environment to run
4640 run : |
47- import codecs
48- import os
49- import platform
50- import sys
51- cpy = platform.python_implementation() == "CPython"
52- base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2])
53- env = "TOXENV={}\n".format(base)
54- print("Picked:\n{}for{}".format(env, sys.version))
41+ import codecs; import os; import sys
42+ env = f"TOXENV=py3{sys.version_info[1]}\n"
43+ print("Picked:\n{env}for{sys.version}")
5544 with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
5645 file_handler.write(env)
5746 shell : python
58- - name : Setup test suite
47+ - name : setup test suite
5948 run : tox -vv --notest
60- - name : Run test suite
49+ - name : run test suite
6150 run : tox --skip-pkg-install
6251 env :
6352 PYTEST_ADDOPTS : " -vv --durations=20"
6453 CI_RUN : " yes"
6554 DIFF_AGAINST : HEAD
6655
6756 check :
68- name : tox env ${{ matrix.tox_env }} - ${{ matrix.os }}
69- runs-on : ${{ matrix.os }}
57+ name : tox env ${{ matrix.tox_env }}
58+ runs-on : ubuntu-latest
7059 strategy :
7160 fail-fast : false
7261 matrix :
73- os :
74- - ubuntu-22.04
75- - windows-2022
7662 tox_env :
77- - dev
7863 - type
79- - readme
80- exclude :
81- - { os: windows-latest, tox_env: readme }
64+ - dev
65+ - pkg_check
8266 steps :
8367 - uses : actions/checkout@v3
84- with :
85- fetch-depth : 0
86- - name : Setup Python "3.11"
68+ - name : setup Python 3.11
8769 uses : actions/setup-python@v4
8870 with :
8971 python-version : " 3.11"
90- - name : Install tox
72+ - name : install tox
9173 run : python -m pip install tox
92- - name : Setup test suite
93- run : tox -vv --notest -e ${{ matrix.tox_env }}
94- - name : Run test suite
95- run : tox --skip-pkg-install -e ${{ matrix.tox_env }}
96-
97- publish :
98- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
99- needs : [check, test]
100- runs-on : ubuntu-22.04
101- steps :
102- - name : Setup python to build package
103- uses : actions/setup-python@v4
104- with :
105- python-version : " 3.11"
106- - name : Install build
107- run : python -m pip install build
108- - uses : actions/checkout@v3
109- with :
110- fetch-depth : 0
111- - name : Build sdist and wheel
112- run : python -m build -s -w . -o dist
113- - name : Publish to PyPi
114- 115- with :
116- skip_existing : true
117- user : __token__
118- password : ${{ secrets.pypi_password }}
74+ - name : run check for ${{ matrix.tox_env }}
75+ run : python -m tox -e ${{ matrix.tox_env }}
76+ env :
77+ UPGRADE_ADVISORY : " yes"
0 commit comments