|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# CI\n", |
| 8 | + "At first, you'll want to write your tests locally, and test them against as many local browsers as possible. However, to really test out your features, you'll want to:\n", |
| 9 | + "\n", |
| 10 | + "- run them against as many real browsers on other operating systems as possible\n", |
| 11 | + "- have easy access to human- and machine-readable test results and build assets\n", |
| 12 | + "- integration with development tools like GitHub\n", |
| 13 | + "\n", |
| 14 | + "Enter Continuous Integration (CI). " |
| 15 | + ] |
| 16 | + }, |
| 17 | + { |
| 18 | + "cell_type": "markdown", |
| 19 | + "metadata": {}, |
| 20 | + "source": [ |
| 21 | + "## Cloud: Multi-Provider\n", |
| 22 | + "Historically, Jupyter projects have used a mix of free-as-in-beer-for-open source hosted services:\n", |
| 23 | + "- [Appveyor](https://www.appveyor.com) for Windows\n", |
| 24 | + "- [Circle-CI](https://circleci.com) for Linux\n", |
| 25 | + "- [TravisCI](https://travis-ci.org) for Linux and MacOS\n", |
| 26 | + "\n", |
| 27 | + "Each brings their own syntax, features, and constraints to building and maintaining robust CI workflows.\n", |
| 28 | + "\n", |
| 29 | + "> `JupyterLibrary` started on Travis-CI, but as soon as we wanted to support more platforms and browsers..." |
| 30 | + ] |
| 31 | + }, |
| 32 | + { |
| 33 | + "cell_type": "markdown", |
| 34 | + "metadata": {}, |
| 35 | + "source": [ |
| 36 | + "## Cloud: Azure Pipelines\n", |
| 37 | + "At the risk of putting all your eggs in one (proprietary) basket, [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) provides a single-file approach to automating all of your tests against reasonably modern versions of browsers. \n", |
| 38 | + "\n", |
| 39 | + "> `JupyterLibrary` is itself built on Azure, and looking at the [pipeline][] and various [jobs and steps][] used can provide the best patterns we have found.\n", |
| 40 | + "\n", |
| 41 | + "[pipeline]: https://github.com/bollwyvl/robotframework-jupyterlibrary/blob/master/azure-pipelines.yml\n", |
| 42 | + "[jobs and steps]: https://github.com/bollwyvl/robotframework-jupyterlibrary/tree/master/ci" |
| 43 | + ] |
| 44 | + }, |
| 45 | + { |
| 46 | + "cell_type": "markdown", |
| 47 | + "metadata": {}, |
| 48 | + "source": [ |
| 49 | + "## On-Premises: Jenkins\n", |
| 50 | + "If you are working on in-house projects, and/or have the ability to support it, [Jenkins](https://jenkins.io) is the gold standard for self-hosted continuous integration. It has almost limitless configurability, and commercial support is available." |
| 51 | + ] |
| 52 | + }, |
| 53 | + { |
| 54 | + "cell_type": "markdown", |
| 55 | + "metadata": {}, |
| 56 | + "source": [ |
| 57 | + "## Approach: It's Just Scripts\n", |
| 58 | + "No matter how shiny or magical your continuous integration tools appear the long-term well-being of your repo depends on techniques that are: \n", |
| 59 | + "- simple\n", |
| 60 | + "- cross-platform\n", |
| 61 | + "- frequently run outside of your CI\n", |
| 62 | + "\n", |
| 63 | + "Since this is Jupyter, this boils down to putting as much as possible into platform-independent python (and, when neccessary, nodejs) code. \n", |
| 64 | + "\n", |
| 65 | + "> `JupyterLibrary` uses a small collection of [scripts][], not shipped as part of the distribution, which handle the pipeline. In addition, this library uses [anaconda-project][] to manage multiple environment versions, and to combine multiple script invocations with different parameters into small, easy-to-remember (and complete) commands. Unfortunately, some of these approaches don't _quite_ work in Azure Pipelines, so some duplication of commands and dependencies are present.\n", |
| 66 | + "\n", |
| 67 | + "[scripts]: https://github.com/bollwyvl/robotframework-jupyterlibrary/tree/master/scripts\n", |
| 68 | + "[anaconda-project]: https://github.com/bollwyvl/robotframework-jupyterlibrary/blob/master/anaconda-project.yml" |
| 69 | + ] |
| 70 | + } |
| 71 | + ], |
| 72 | + "metadata": { |
| 73 | + "kernelspec": { |
| 74 | + "display_name": "Python 3", |
| 75 | + "language": "python", |
| 76 | + "name": "python3" |
| 77 | + }, |
| 78 | + "language_info": { |
| 79 | + "codemirror_mode": { |
| 80 | + "name": "ipython", |
| 81 | + "version": 3 |
| 82 | + }, |
| 83 | + "file_extension": ".py", |
| 84 | + "mimetype": "text/x-python", |
| 85 | + "name": "python", |
| 86 | + "nbconvert_exporter": "python", |
| 87 | + "pygments_lexer": "ipython3", |
| 88 | + "version": "3.7.1" |
| 89 | + } |
| 90 | + }, |
| 91 | + "nbformat": 4, |
| 92 | + "nbformat_minor": 2 |
| 93 | +} |
0 commit comments