@@ -10,31 +10,23 @@ concurrency:
1010 cancel-in-progress : true
1111
1212jobs :
13- lint :
14- runs-on : ubuntu-latest
15- steps :
16- - uses : actions/checkout@v3
17- - uses : actions/setup-python@v4
18- with :
19- python-version : " 3.10"
20- -
uses :
pre-commit/[email protected] 21-
2213 test :
2314 name : test ${{ matrix.py }} - ${{ matrix.os }}
2415 runs-on : ${{ matrix.os }}
2516 strategy :
2617 fail-fast : false
2718 matrix :
2819 py :
20+ - " 3.11.0-beta.4"
2921 - " 3.10"
30- - " pypy-3.7-v7.3.7 " # ahead to start it earlier because takes longer
22+ - " pypy-3.7-v7.3.9 " # ahead to start it earlier because takes longer
3123 - " 3.9"
3224 - " 3.8"
3325 - " 3.7"
3426 os :
35- - ubuntu-20 .04
27+ - ubuntu-22 .04
3628 - windows-2022
37- - macos-10.15
29+ - macos-12
3830
3931 steps :
4032 - name : Setup python for tox
@@ -52,16 +44,11 @@ jobs:
5244 python-version : ${{ matrix.py }}
5345 - name : Pick environment to run
5446 run : |
55- import codecs
56- import os
57- import platform
58- import sys
59- cpy = platform.python_implementation() == "CPython"
60- base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2])
61- env = "TOXENV={}\n".format(base)
62- print("Picked:\n{}for{}".format(env, sys.version))
63- with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
64- file_handler.write(env)
47+ import os; import platform; import sys; from pathlib import Path
48+ env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
49+ print(f"Picked: {env} for {sys.version} based of {sys.executable}")
50+ with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
51+ file_handler.write(env)
6552 shell : python
6653 - name : Setup test suite
6754 run : tox -vv --notest
8269
8370 coverage :
8471 name : Combine coverage
85- runs-on : ubuntu-latest
72+ runs-on : ubuntu-22.04
8673 needs : test
8774 steps :
8875 - uses : actions/checkout@v3
@@ -119,8 +106,8 @@ jobs:
119106 fail-fast : false
120107 matrix :
121108 os :
122- - ubuntu-latest
123- - windows-latest
109+ - ubuntu-22.04
110+ - windows-2022
124111 tox_env :
125112 - dev
126113 - type
@@ -145,8 +132,8 @@ jobs:
145132
146133 publish :
147134 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
148- needs : [ check, coverage, lint ]
149- runs-on : ubuntu-latest
135+ needs : [ check, coverage ]
136+ runs-on : ubuntu-22.04
150137 steps :
151138 - name : Setup python to build package
152139 uses : actions/setup-python@v4
@@ -160,7 +147,7 @@ jobs:
160147 - name : Build sdist and wheel
161148 run : python -m build -s -w . -o dist
162149 - name : Publish to PyPi
163- uses : pypa/gh-action-pypi-publish@master
150+ uses : pypa/gh-action-pypi-publish@v1.5.1
164151 with :
165152 skip_existing : true
166153 user : __token__
0 commit comments