@@ -10,31 +10,23 @@ concurrency:
10
10
cancel-in-progress : true
11
11
12
12
jobs :
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
-
22
13
test :
23
14
name : test ${{ matrix.py }} - ${{ matrix.os }}
24
15
runs-on : ${{ matrix.os }}
25
16
strategy :
26
17
fail-fast : false
27
18
matrix :
28
19
py :
20
+ - " 3.11.0-beta.4"
29
21
- " 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
31
23
- " 3.9"
32
24
- " 3.8"
33
25
- " 3.7"
34
26
os :
35
- - ubuntu-20 .04
27
+ - ubuntu-22 .04
36
28
- windows-2022
37
- - macos-10.15
29
+ - macos-12
38
30
39
31
steps :
40
32
- name : Setup python for tox
@@ -52,16 +44,11 @@ jobs:
52
44
python-version : ${{ matrix.py }}
53
45
- name : Pick environment to run
54
46
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)
65
52
shell : python
66
53
- name : Setup test suite
67
54
run : tox -vv --notest
82
69
83
70
coverage :
84
71
name : Combine coverage
85
- runs-on : ubuntu-latest
72
+ runs-on : ubuntu-22.04
86
73
needs : test
87
74
steps :
88
75
- uses : actions/checkout@v3
@@ -119,8 +106,8 @@ jobs:
119
106
fail-fast : false
120
107
matrix :
121
108
os :
122
- - ubuntu-latest
123
- - windows-latest
109
+ - ubuntu-22.04
110
+ - windows-2022
124
111
tox_env :
125
112
- dev
126
113
- type
@@ -145,8 +132,8 @@ jobs:
145
132
146
133
publish :
147
134
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
150
137
steps :
151
138
- name : Setup python to build package
152
139
uses : actions/setup-python@v4
@@ -160,7 +147,7 @@ jobs:
160
147
- name : Build sdist and wheel
161
148
run : python -m build -s -w . -o dist
162
149
- name : Publish to PyPi
163
- uses : pypa/gh-action-pypi-publish@master
150
+ uses : pypa/gh-action-pypi-publish@v1.5.1
164
151
with :
165
152
skip_existing : true
166
153
user : __token__
0 commit comments