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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Camila Maia
August 13, 2021
Programming
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CI e automação de deploys em bibliotecas Python
DevOps Extreme 2021
Camila Maia
August 13, 2021
More Decks by Camila Maia
See All by Camila Maia
GitHub Actions - Semana DevOps LINUXTips.pdf
camilamaia
0
55
Minha Jornada em Developer Experience (DX) - DevOpsDays Salvador 2024
camilamaia
0
55
Cumbuca Dev: Ensinando com Open Source - 71º Python Floripa no MeLi
camilamaia
0
87
COMO E PORQUE ENSINAR A PROGRAMAR COM OPEN SOURCE - Python Brasil 2023
camilamaia
0
84
Como testar e manter APIs de qualidade - Codecon Digital 2023
camilamaia
0
1.2k
factory_boy: testing like a pro. DjangoCon US 2022
camilamaia
0
940
ScanAPI Workshop. DjangoCon EU 2022
camilamaia
0
830
factory_boy: testing like a pro. DjangoCon EU 2022
camilamaia
1
930
Como testar e documentar REST APIs com ScanAPI - Agile Testers Conference 2021
camilamaia
0
460
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
190
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
120
エージェンティックRAGにAWSで入門しよう!
har1101
7
1.1k
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
dRuby over BLE
makicamel
2
320
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
4.1k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.5k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
740
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
290
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
Modding RubyKaigi for Myself
yui_knk
0
890
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.3k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Unsuck your backbone
ammeep
672
58k
Why Our Code Smells
bkeepers
PRO
340
58k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Automating Front-end Workflow
addyosmani
1370
210k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
360
How to Talk to Developers About Accessibility
jct
2
220
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
390
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building the Perfect Custom Keyboard
takai
2
780
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