Slide 1

Slide 1 text

Никита Соболев github.com/sobolevn

Slide 2

Slide 2 text

>_ X GitHub Actions

Slide 3

Slide 3 text

Задача: прогоним линтер для Python проекта

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

name: Python package on: [push] jobs: build: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6, 3.7] steps: # ...

Slide 6

Slide 6 text

name: Python package on: [push] jobs: build: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6, 3.7] steps: # ...

Slide 7

Slide 7 text

name: Python package on: [push] jobs: build: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6, 3.7] steps: # ...

Slide 8

Slide 8 text

name: Python package on: [push] jobs: build: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [2.7, 3.5, 3.6, 3.7] steps: # ...

Slide 9

Slide 9 text

Подготовка

Slide 10

Slide 10 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt

Slide 11

Slide 11 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt

Slide 12

Slide 12 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt

Slide 13

Slide 13 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt matrix: python-version: [2.7, 3.5, 3.6, 3.7]

Slide 14

Slide 14 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt

Slide 15

Slide 15 text

name: Python package # ... steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | pip install -r requirements.txt

Slide 16

Slide 16 text

Подготовились. Проверяем!

Slide 17

Slide 17 text

name: Python package # ... steps: # ... - name: Lint with wemake-python-styleguide run: | pip install flake8 flake8 . - name: Test with pytest run: | pip install pytest pytest

Slide 18

Slide 18 text

name: Python package # ... steps: # ... - name: Lint with wemake-python-styleguide run: | pip install flake8 flake8 . - name: Test with pytest run: | pip install pytest pytest

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Создай свое

Slide 24

Slide 24 text

Dockerfile

Slide 25

Slide 25 text

github.com/wemake- services/wemake- python-styleguide

Slide 26

Slide 26 text

Но есть и готовые фреймворки

Slide 27

Slide 27 text

Готовые npm компоненты

Slide 28

Slide 28 text

Готовые npm компоненты > @actions/core

Slide 29

Slide 29 text

Готовые npm компоненты > @actions/core > @actions/exec

Slide 30

Slide 30 text

Готовые npm компоненты > @actions/core > @actions/exec > @actions/io

Slide 31

Slide 31 text

Готовые npm компоненты > @actions/core > @actions/exec > @actions/io > @actions/tool-cache

Slide 32

Slide 32 text

Готовые npm компоненты > @actions/core > @actions/exec > @actions/io > @actions/tool-cache > @actions/github

Slide 33

Slide 33 text

🚀

Slide 34

Slide 34 text

github.com/sobolevn/ restrict-cursing- action

Slide 35

Slide 35 text

sobolevn.me/talks/devoops-2019

Slide 36

Slide 36 text

Внимание! Новинки!

Slide 37

Slide 37 text

permissions: actions: read|write|none checks: read|write|none contents: read|write|none deployments: read|write|none issues: read|write|none packages: read|write|none pull-requests: read|write|none repository-projects: read|write|none security-events: read|write|none statuses: read|write|none GITHUB_TOKEN

Slide 38

Slide 38 text

Deploy Environments

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

>_ X GitHub Container Registry

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

>_ X GitHub Codespaces

Slide 44

Slide 44 text

Позволяет запустить VSCode прям в браузере

Slide 45

Slide 45 text

Очень удобно для определенного класса задач

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Удобство 1: папка .devcontainer/

Slide 50

Slide 50 text

{ "name": "HypothesisWorks/hypothesis", "image": "python:3.8-slim-buster", "settings": { "python.pythonPath": "${workspaceFolder}/.venv/bin/python3", }, // After container is created, we install all the requirements, // and show what commands there are in our own tooling: "postCreateCommand": "apt-get update && apt-get install -y make", }

Slide 51

Slide 51 text

Удобство 2: синхронизация настроек

Slide 52

Slide 52 text

Удобство 3: репозиторий dotfiles

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

github.com/sobolevn/ dotfiles

Slide 55

Slide 55 text

>_ X GitHub Issue Forms

Slide 56

Slide 56 text

У всех была вечная проблема: пользователи игнорировали все, что можно было игнорировать

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Скоро будет доступно для всех ;)

Slide 60

Slide 60 text

>_ X GitHub Discussions

Slide 61

Slide 61 text

Не каждый issue представляет собой ошибку или задачу

Slide 62

Slide 62 text

Иногда мы хотим просто задать вопрос или обсудить что-то

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

>_ X GitHub Sponsors

Slide 67

Slide 67 text

Удобный способ поддержать ваш любимый open-source проект

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

sobolevn.me Вопросы? github.com/sobolevn