@@ -15,34 +15,32 @@ jobs:
15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- os : [ubuntu-20.04 , macos-11 , windows-2019 ]
19
- python-version : [ "3.6 ", "3.7 ", "3.8 ", "3.9 ", "3.10 ", "pypy3.7 ", "pypy3.8", "pypy3.9", ]
18
+ os : [ubuntu-latest , macos-latest , windows-latest ]
19
+ python-version : [ "3.8 ", "3.9 ", "3.10 ", "3.11 ", "3.12 ", "3.13 ", "pypy3.8", "pypy3.9", ]
20
20
runs-on : ${{ matrix.os }}
21
21
steps :
22
22
- name : Check out repository
23
- uses : actions/checkout@v3
23
+ uses : actions/checkout@v4
24
24
- name : Set up python
25
25
id : setup-python
26
- uses : actions/setup-python@v4
26
+ uses : actions/setup-python@v5
27
27
with :
28
28
python-version : ${{ matrix.python-version }}
29
29
- name : Print Python Information
30
30
run : python -VV
31
- - name : Install and configure Poetry
32
- run : |
33
- pip3 install poetry
34
- poetry config virtualenvs.in-project true
31
+ - name : Install and configure uv
32
+ run : pip3 install uv
35
33
- name : Set up cache
36
-
37
- id : cache-virtualenv
34
+ uses : actions/cache@v4
35
+ id : cached-uv-dependencies
38
36
with :
39
- requirement_files : poetry.lock
40
- custom_virtualenv_dir : . venv
37
+ path : .venv
38
+ key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
41
39
- name : Install dependencies
42
- run : poetry install
43
- if : steps.cache-virtualenv .outputs.cache-hit != 'true'
40
+ run : uv sync --all-extras
41
+ if : steps.cached-uv-dependencies .outputs.cache-hit != 'true'
44
42
- name : run tests
45
- run : poetry run pytest -vv tests/*
43
+ run : uv run pytest -vv tests/*
46
44
47
45
builder :
48
46
needs : [test]
@@ -62,25 +60,28 @@ jobs:
62
60
echo "PYTHON_ARCHITECTURE=x64" >> $GITHUB_ENV
63
61
fi
64
62
- name : Set up python
65
- uses : actions/setup-python@v4
63
+ uses : actions/setup-python@v5
66
64
with :
67
65
python-version : " 3.9.x"
68
66
architecture : " ${{ env.PYTHON_ARCHITECTURE }}"
69
67
- name : Print Python Information
70
68
run : python -VV
71
- - name : Update dependencies
72
- run : python -m pip install -U pip wheel setuptools twine poetry
69
+ - name : Install and configure uv
70
+ run : pip3 install uv
73
71
- name : Set up cache
74
-
75
- id : cache-virtualenv
72
+ uses : actions/cache@v4
73
+ id : cached-uv-dependencies
76
74
with :
77
- requirement_files : poetry.lock
78
- custom_virtualenv_dir : . venv
75
+ path : .venv
76
+ key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
79
77
- name : Install dependencies
80
- run : poetry install
81
- if : steps.cache-virtualenv.outputs.cache-hit != 'true'
78
+ run : uv sync --all-extras
79
+ if : steps.cached-uv-dependencies.outputs.cache-hit != 'true'
80
+
82
81
- name : Build universal source Archive and wheel
83
- run : poetry build
82
+ run : uv build
83
+ - name : delete all files in dist that is not tar.gz or whl
84
+ run : find dist/ -type f ! -name "*.tar.gz" ! -name "*.whl" -delete
84
85
- name : Upload artifacts
85
86
uses : actions/upload-artifact@v3
86
87
with :
@@ -89,11 +90,13 @@ jobs:
89
90
90
91
publisher_release :
91
92
needs : [builder]
92
- if : startsWith(github.event. ref, 'refs/tags/v') && github.ref == 'refs/heads/master'
93
+ if : startsWith(github.ref, 'refs/tags/v')
93
94
runs-on : ubuntu-latest
95
+ permissions :
96
+ id-token : write
94
97
steps :
95
98
- name : Check out repository
96
- uses : actions/checkout@v3
99
+ uses : actions/checkout@v4
97
100
- name : Download artifacts
98
101
uses : actions/download-artifact@v3
99
102
with :
@@ -103,16 +106,15 @@ jobs:
103
106
uses : pypa/gh-action-pypi-publish@release/v1
104
107
with :
105
108
verbose : true
106
- user : __token__
107
- password : ${{ secrets.PYPI_API_TOKEN }}
109
+
108
110
109
111
publisher_latest :
110
112
needs : [builder]
111
113
if : github.ref == 'refs/heads/master'
112
114
runs-on : ubuntu-latest
113
115
steps :
114
116
- name : Check out repository
115
- uses : actions/checkout@v3
117
+ uses : actions/checkout@v4
116
118
- name : Download artifacts
117
119
uses : actions/download-artifact@v3
118
120
with :
0 commit comments