Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Integration for Python projects in 5 minutes

Continuous Integration for Python projects in 5 minutes

It's easy to get started with continuous integration for your Python project (running automated tests on every merge) using the available tools and services. This lightning talk shows how.

382b18eebb1386e80ff7e20fd1eb784e?s=128

Senko Rašić

July 05, 2013
Tweet

Transcript

  1. Senko Rasic (@senkorasic) goodcode.io Continuous Integration in 5 minutes

  2. Senko Rasic (@senkorasic) goodcode.io Step 0: have tests don't tolerate

    failing tests
  3. Senko Rasic (@senkorasic) goodcode.io

  4. Senko Rasic (@senkorasic) goodcode.io Step 1: make it easy to

    recreate the testing environment pip install .
  5. Senko Rasic (@senkorasic) goodcode.io Step 2: set up a CI

    server (Jenkins, Travis, Circle, Bamboo, ...)
  6. Senko Rasic (@senkorasic) goodcode.io .travis.yml language: python python: - 2.6

    - 2.7 - 3.3 install: pip install . script: python setup.py test
  7. Senko Rasic (@senkorasic) goodcode.io

  8. Senko Rasic (@senkorasic) goodcode.io

  9. Senko Rasic (@senkorasic) goodcode.io bonus: lint on CI install: pip

    install . flake8 script: - flake8 . - python setup.py test
  10. Senko Rasic (@senkorasic) goodcode.io Step 3: coverage install: pip install

    . coverage script: coverage python setup.py test
  11. Senko Rasic (@senkorasic) goodcode.io coveralls.io install: - pip install .

    coverage coveralls script: - coverage python setup.py test after_success: - coveralls
  12. Senko Rasic (@senkorasic) goodcode.io

  13. Senko Rasic (@senkorasic) goodcode.io Thanks! Q? grab me afterwards