2424 pip install --upgrade ruff
2525 - name : Lint with ruff
2626 run : |
27- ruff . --format github
27+ ruff . --output- format github
2828
2929 PyLint :
3030 runs-on : ubuntu-latest
8181 - name : Check code style with black
8282 run : |
8383 black --check exec_helpers
84- Metadata :
85- name : Validate metadata
86- runs-on : ubuntu-latest
87- steps :
88- - uses : actions/checkout@v4
89- - name : Set up Python
90- uses : actions/setup-python@v4
91- with :
92- python-version : ' 3.x'
93- - name : Install dependencies
94- run : |
95- python -m pip install --upgrade pip
96- pip install --upgrade twine build
97- - name : Build package
98- run : |
99- python -m build -s
100- - name : Validate metadata
101- run : |
102- twine check dist/*
10384
10485 Test :
105- needs : [PEP8, PyLint, MyPy, Black, Metadata ] # isort is broken
86+ needs : [PEP8, PyLint, MyPy, Black] # isort is broken
10687 runs-on : ${{ matrix.os }}
10788 strategy :
10889 max-parallel : 6
@@ -151,7 +132,6 @@ jobs:
151132
152133 Build :
153134 needs : [ Test ]
154- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
155135 runs-on : ubuntu-latest
156136 steps :
157137 - uses : actions/checkout@v4
@@ -171,9 +151,35 @@ jobs:
171151 - uses : actions/upload-artifact@v3
172152 with :
173153 path : dist/*
154+ name : wheels
155+
156+ Metadata :
157+ name : Validate metadata
158+ runs-on : ubuntu-latest
159+ needs : [ Build ]
160+ steps :
161+ - uses : actions/checkout@v4
162+ - name : Set up Python
163+ uses : actions/setup-python@v4
164+ with :
165+ python-version : ' 3.x'
166+ cache : ' pip'
167+ - name : Install dependencies
168+ run : |
169+ python -m pip install --upgrade pip
170+ pip install --upgrade twine
171+ - uses : actions/download-artifact@v3
172+ with :
173+ # unpacks default artifact into dist/
174+ # if `name: wheels` is omitted, the action will create extra parent dir
175+ name : wheels
176+ path : dist
177+ - name : Validate metadata
178+ run : |
179+ twine check dist/*
174180
175181 Deploy :
176- needs : [Build]
182+ needs : [Build, Metadata ]
177183 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
178184 runs-on : ubuntu-latest
179185 environment :
@@ -186,7 +192,7 @@ jobs:
186192 with :
187193 # unpacks default artifact into dist/
188194 # if `name: artifact` is omitted, the action will create extra parent dir
189- name : artifact
195+ name : wheels
190196 path : dist
191197 - name : Publish package distributions to PyPI
192198 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments