Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CI e automação de deploys em bibliotecas Python
Search
Camila Maia
August 13, 2021
Programming
0
340
CI e automação de deploys em bibliotecas Python
DevOps Extreme 2021
Camila Maia
August 13, 2021
Tweet
Share
More Decks by Camila Maia
See All by Camila Maia
GitHub Actions - Semana DevOps LINUXTips.pdf
camilamaia
0
32
Minha Jornada em Developer Experience (DX) - DevOpsDays Salvador 2024
camilamaia
0
28
Cumbuca Dev: Ensinando com Open Source - 71º Python Floripa no MeLi
camilamaia
0
60
COMO E PORQUE ENSINAR A PROGRAMAR COM OPEN SOURCE - Python Brasil 2023
camilamaia
0
46
Como testar e manter APIs de qualidade - Codecon Digital 2023
camilamaia
0
1k
factory_boy: testing like a pro. DjangoCon US 2022
camilamaia
0
680
ScanAPI Workshop. DjangoCon EU 2022
camilamaia
0
620
factory_boy: testing like a pro. DjangoCon EU 2022
camilamaia
1
710
Como testar e documentar REST APIs com ScanAPI - Agile Testers Conference 2021
camilamaia
0
310
Other Decks in Programming
See All in Programming
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
17
3.9k
ワープロって実は計算機で
pepepper
2
1.4k
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
850
Webinar: AI-Powered Development: Transformiere deinen Workflow mit Coding Tools und MCP Servern
danielsogl
0
130
Reactの歴史を振り返る
tutinoko
1
180
新世界の理解
koriym
0
140
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
160
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
380
Comparing decimals in Swift Testing
417_72ki
0
170
A Gopher's Guide to Vibe Coding
danicat
0
150
あのころの iPod を どうにか再生させたい
orumin
2
2.5k
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.7k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
YesSQL, Process and Tooling at Scale
rocio
173
14k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Bash Introduction
62gerente
614
210k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Six Lessons from altMBA
skipperchong
28
4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Transcript
CI e automação de deploys em bibliotecas Python Para deixar
qualquer DevOps orgulhoso ⭐ DevOps Extreme - Ago 2021 Camila Maia
Esta apresentação está disponível em: speakerdeck.com/cmaiacd
Quem sou eu? - Desenvolvedora Backend - 10+ anos xp
👵 - Python 🐍 e Ruby 💎 - OpenSource e Comunidades ❤ - Organização de eventos: Pyjamas, EuroPython, Python Brasil….
- Primeiro perfil aprovado no programa de Sponsors para quem
reside no Brasil Quem sou eu?
A biblioteca • Biblioteca Python • Gerenciamento de pacotes e
dependências via Poetry • Distribuída via PyPI e TestPyPI • Código no GitHub
Integração Contínua: • Testes unitários + Cobertura de Testes •
Lint: checagem de formatação do código, tipagem estática e formatação de mensagens de commit • Testes de integração Automação de deploys: • Merge no branch main: deploy no TestPyPI • Nova release: deploy no PyPI O objetivo
Ferramenta
A Aplicação Exemplo
• Framework de código aberto • Command line interface (CLI)
• Escrito em Python Objetivos: 1. Fornecer Live Documentation 2. Possibilitar a implementação de Testes de Integração
Fluxo ESPECIFICAÇÃO YAML / JSON RELATÓRIO EFETUA AS REQUESTS EXECUTA
OS TESTES
Integração Contínua
Integração Contínua Main Branch 1 Testes Unitários Lint Testes de
Integração
Makefile test: @pytest --cov=./scanapi --cov-report=xml black: @poetry run black -l
80 --check . --exclude=.venv flake8: @poetry run flake8 --ignore=E501,W501,E231,W503 mypy: @poetry run mypy scanapi gitlint: @poetry run gitlint --ignore-stdin check: black flake8 mypy gitlint
Pytest and Codecov
Lint
Testes de Integração - Run Examples
Deploys
Deploys Main Branch 1 Publish to TestPyPI New Release Publish
to PyPI
timestamp = `date -u +'%Y%m%d%H%M%S'` change-version: @poetry version `poetry version
-s | cut -f-3 -d.`.dev$(timestamp) Makefile + Setup das Chaves
Publish to TestPyPI
Publish to PyPI
👀
scanapi.dev 🌐
GitHub - https://github.com/scanapi Twitter - @ScanAPI_ Discord - discord.scanapi.dev Comunicação:
ScanAPI Bora trocar uma ideia! 🗣
MUITO OBRIGADA! @cmaiacd camilamaia cmaiacd.com