@@ -137,9 +137,9 @@ commands:
137137 install_poetry :
138138 description : " Install poetry"
139139 steps :
140- - run : python3 -m venv $POETRY_HOME
141- - run : $POETRY_HOME/bin/pip install --upgrade pip
142- - run : $POETRY_HOME/bin/pip install poetry==1.3.1
140+ - run : python3 -m venv $POETRY_HOME
141+ - run : $POETRY_HOME/bin/pip install --upgrade pip
142+ - run : $POETRY_HOME/bin/pip install poetry==1.3.1
143143 test :
144144 description : " Run tests"
145145 parameters :
@@ -178,72 +178,6 @@ commands:
178178 root : coverage-results
179179 paths :
180180 - .coverage.*
181- lint :
182- description : " Run pre-commit"
183- steps :
184- - run : pre-commit run --all-files --show-diff-on-failure
185- typecheck :
186- description : " Run mypy"
187- steps :
188- - using_poetry :
189- cache_key : " typecheck-v2"
190- steps :
191- - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi --only typecheck
192- - run : $POETRY_HOME/bin/poetry run mypy aiosmtplib
193- security :
194- description : " Run security checks"
195- steps :
196- - using_poetry :
197- cache_key : " security-v3"
198- steps :
199- - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi -E uvloop -E docs --with test,typecheck,security
200- - run : $POETRY_HOME/bin/poetry run bandit -n 10 -x tests -r aiosmtplib
201- - run : $POETRY_HOME/bin/poetry export --with test -E docs -E uvloop -f requirements.txt --without-hashes | $POETRY_HOME/bin/poetry run safety check --stdin
202- docs :
203- description : " Run docs build"
204- steps :
205- - using_poetry :
206- cache_key : " docs-v2"
207- steps :
208- - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi -E docs --with test
209- - run : $POETRY_HOME/bin/poetry run sphinx-build -nWT -b doctest -d ./docs/build/doctrees ./docs ./docs/build/html
210- - run : $POETRY_HOME/bin/poetry run sphinx-build -nWT -b dummy -d ./docs/build/doctrees ./docs ./docs/build/html
211- build :
212- description : " Run poetry build"
213- steps :
214- - run : $POETRY_HOME/bin/poetry check
215- - run : $POETRY_HOME/bin/poetry build -vv
216- - persist_to_workspace :
217- root : dist
218- paths :
219- - aiosmtplib-*.tar.gz
220- - aiosmtplib-*.whl
221- - store_artifacts :
222- path : dist/
223- deploy :
224- description : " Deploy to PyPI"
225- steps :
226- - run : $POETRY_HOME/bin/poetry config repositories.testpypi https://test.pypi.org/legacy/
227- - run : $POETRY_HOME/bin/poetry publish -vv --repository testpypi --username $TESTPYPI_USERNAME --password $TESTPYPI_PASSWORD
228- - run : $POETRY_HOME/bin/poetry publish -vv --username $PYPI_USERNAME --password $PYPI_PASSWORD
229- coverage :
230- description : " Collect coverage"
231- steps :
232- - run : cp coverage-results/.coverage.* ./
233- - using_poetry :
234- cache_key : " coverage-v2"
235- steps :
236- - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi --with test
237- - run : $POETRY_HOME/bin/poetry run coverage combine
238- - run : $POETRY_HOME/bin/poetry run coverage xml
239- - run : $POETRY_HOME/bin/poetry run coverage html
240- - store_artifacts :
241- path : coverage.xml
242- - store_artifacts :
243- path : htmlcov
244- - codecov/upload :
245- file : coverage.xml
246- - run : $POETRY_HOME/bin/poetry run coverage report --fail-under=90
247181
248182jobs :
249183 lint :
@@ -254,16 +188,19 @@ jobs:
254188 steps :
255189 - using_pre_commit :
256190 steps :
257- - lint
258-
191+ - run : pre-commit run --all-files --show-diff-on-failure
259192 typecheck :
260193 executor : default
261194 steps :
262195 - checkout
263196 - using_pip_cache :
264197 steps :
265198 - install_poetry
266- - typecheck
199+ - using_poetry :
200+ cache_key : " typecheck-v2"
201+ steps :
202+ - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi --only typecheck
203+ - run : $POETRY_HOME/bin/poetry run mypy aiosmtplib
267204
268205 security :
269206 executor : default
@@ -272,7 +209,12 @@ jobs:
272209 - using_pip_cache :
273210 steps :
274211 - install_poetry
275- - security
212+ - using_poetry :
213+ cache_key : " security-v3"
214+ steps :
215+ - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi -E uvloop -E docs --with test,typecheck,security
216+ - run : $POETRY_HOME/bin/poetry run bandit -n 10 -x tests -r aiosmtplib
217+ - run : $POETRY_HOME/bin/poetry export --with test -E docs -E uvloop -f requirements.txt --without-hashes | $POETRY_HOME/bin/poetry run safety check --stdin
276218
277219 build :
278220 executor : default
@@ -281,8 +223,15 @@ jobs:
281223 - using_pip_cache :
282224 steps :
283225 - install_poetry
284- - build
285-
226+ - run : $POETRY_HOME/bin/poetry check
227+ - run : $POETRY_HOME/bin/poetry build -vv
228+ - persist_to_workspace :
229+ root : dist
230+ paths :
231+ - aiosmtplib-*.tar.gz
232+ - aiosmtplib-*.whl
233+ - store_artifacts :
234+ path : dist/
286235 docs :
287236 executor : default
288237 steps :
@@ -292,24 +241,20 @@ jobs:
292241 - using_pip_cache :
293242 steps :
294243 - install_poetry
295- - docs
244+ - using_poetry :
245+ cache_key : " docs-v2"
246+ steps :
247+ - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi -E docs --with test
248+ - run : $POETRY_HOME/bin/poetry run sphinx-build -nWT -b doctest -d ./docs/build/doctrees ./docs ./docs/build/html
249+ - run : $POETRY_HOME/bin/poetry run sphinx-build -nWT -b dummy -d ./docs/build/doctrees ./docs ./docs/build/html
296250
297251 test :
298252 executor : <<parameters.python_version>>
299253 parameters :
300254 python_version :
301255 type : enum
302256 description : " executor name"
303- enum :
304- [
305- " py37" ,
306- " py38" ,
307- " py39" ,
308- " py310" ,
309- " py311" ,
310- " pypy38" ,
311- " pypy39" ,
312- ]
257+ enum : ["py37", "py38", "py39", "py310", "py311", "pypy38", "pypy39"]
313258 event_loop :
314259 type : enum
315260 description : " event loop type"
@@ -343,7 +288,21 @@ jobs:
343288 - using_pip_cache :
344289 steps :
345290 - install_poetry
346- - coverage
291+ - run : cp coverage-results/.coverage.* ./
292+ - using_poetry :
293+ cache_key : " coverage-v2"
294+ steps :
295+ - run : $POETRY_HOME/bin/poetry install --no-interaction --no-ansi --with test
296+ - run : $POETRY_HOME/bin/poetry run coverage combine
297+ - run : $POETRY_HOME/bin/poetry run coverage xml
298+ - run : $POETRY_HOME/bin/poetry run coverage html
299+ - store_artifacts :
300+ path : coverage.xml
301+ - store_artifacts :
302+ path : htmlcov
303+ - codecov/upload :
304+ file : coverage.xml
305+ - run : $POETRY_HOME/bin/poetry run coverage report --fail-under=90
347306
348307 deploy :
349308 executor : default
@@ -354,11 +313,12 @@ jobs:
354313 - using_pip_cache :
355314 steps :
356315 - install_poetry
357- - deploy
316+ - run : $POETRY_HOME/bin/poetry config repositories.testpypi https://test.pypi.org/legacy/
317+ - run : $POETRY_HOME/bin/poetry publish -vv --repository testpypi --username $TESTPYPI_USERNAME --password $TESTPYPI_PASSWORD
318+ - run : $POETRY_HOME/bin/poetry publish -vv --username $PYPI_USERNAME --password $PYPI_PASSWORD
358319
359320workflows :
360- version : 2
361- lint :
321+ static_checks :
362322 jobs :
363323 - typecheck : &base-job
364324 context :
@@ -416,5 +376,4 @@ workflows:
416376 ignore : /.*/
417377 tags :
418378 only : /^v.*/
419-
420379# VS Code Extension Version: 1.5.1
0 commit comments