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
360
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
29
Cumbuca Dev: Ensinando com Open Source - 71º Python Floripa no MeLi
camilamaia
0
63
COMO E PORQUE ENSINAR A PROGRAMAR COM OPEN SOURCE - Python Brasil 2023
camilamaia
0
47
Como testar e manter APIs de qualidade - Codecon Digital 2023
camilamaia
0
1.1k
factory_boy: testing like a pro. DjangoCon US 2022
camilamaia
0
700
ScanAPI Workshop. DjangoCon EU 2022
camilamaia
0
630
factory_boy: testing like a pro. DjangoCon EU 2022
camilamaia
1
730
Como testar e documentar REST APIs com ScanAPI - Agile Testers Conference 2021
camilamaia
0
330
Other Decks in Programming
See All in Programming
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
720
rage against annotate_predecessor
junk0612
0
160
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
TDD 実践ミニトーク
contour_gara
1
290
私の後悔をAWS DMSで解決した話
hiramax
4
210
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
410
AIコーディングAgentとの向き合い方
eycjur
0
270
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
230
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
400
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
210
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
330
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Become a Pro
speakerdeck
PRO
29
5.5k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Documentation Writing (for coders)
carmenintech
74
5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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