Developer CI Benefits

This talk discusses CI setup, road to benefits, and benefits.
 

Read more about Developer CI Benefits

This talk summarizes what continuous integration (CI) is, basic frontend setup, and how it can benefit engineers.

 

Read more about Talk Objectives

Talk Objectives

Continuous Integration is the practice of merging all developer working copies to a shared mainline several times a day.

—Wikipedia

Continuous Integration is a pattern of programming combining testing, safety checks, and development practices to confidently push code from a development branch to production ready branch continuously.

—Me

Read more about what CI is

What is Continuous Integration?

  • When more than 1 developer that wants to merge into a production branch at once
  • When mistakes are not caught or can not be fixed before deployment
  • When dependencies become out of date
  • When developers have to wait extended periods of time to merge code
  • When packages are dependent on other packages
  • When a package is updated and code must updated in multiple places/repositories

Read more about what problems CI solves

What Problems Does CI Solve?

Defining CI: Talk setup with comments from experts and CI explanation
Testing: Description of unit testing and integration with example(s)

CI Tooling: Exploration into using safety checks and doc templates
CI Setup: A walk through of setting up CI today

Take-aways: A few ideas and the code repository

Read more about CI Key Points

Key Points

Testing is one of these things that people don't talk about it a lot because people don't do it. ...People that do do testing are extremely passionate about it—like crossfit. ...I have a feeling a lot of people don't test.
 

—Wes Bos

Releasing software is too often an art; it should be an engineering discipline.
 

—David Farley

Go to the Supporting Quotes doc

Supporting Quotes

Documentation is a key part of implementing CI. There are many patterns for documentation. The great news is that Github provides standard templates and there is a lot of content that can be copied to get documentation setup quickly.

 

Read more about Documentation Tooling

Documentation and Feedback Tooling

Unit Tests test small blocks of code to ensure that what is expected is the result.
 

Unit tests provide a lot of help with CI. They define code quality and provide developers with feedback without having to push/merge/host code.

 

Read more about Unit Testing

Unit Testing

Integration tests go through particular tests flows to define passing or failing scenarios of a small part of an application.

 

Integration tests are different than Unit Tests because they test part of a compiled feature rather than a unit of a feature.

 

Integration tests are different than End-to-end Tests because they only test a compiled feature rather than an entire system
 

Read more about Integration Testing

Integration Testing

Safety Checks are a catch-all for this talk. Safety Check help communicate code and code quality.
 

Documentation, Document Templates, Linting, Spell Checking, and Type Checking are all Safety Checks. These tools can be automated to run during commits, in development, or during CI.

 

Read more about Safety Checks

Safety Checks

Most tests and safety checks are run via shell commands or cli tools. Shell commands are commands that can be run in an application.

 

The commands can be read from package.json files or config yml files.

 


Read more about Running Tests and Checks

Running Tests and Checks

Getting CI started for a repository takes minutes or even less!

 

CI can be auto setup if and when test runner scripts are executable and can be found. For JavaScript, this means having a test script within a the package.json file of a repository.

 

If more custom testing is required, this can be done via configuration yml files.

 

Read more about Implementing CI

Implementing CI

One of the huge benefits of basic CI is automatic dependency updates with tools like Greenkeeper.

 

This means that if a dependency package publishes a new version, Greenkeeper will submit a Pull Request trigging CI automatically—without an developer time involved at all!

 

Read more about Dependency Updates

Dependency Updates

Publishing packages, even if the only dependents of an organization's dependents can be very valuable. With a few steps packages can be published publicly or privately.
 

Read more about Publishing Repositories

Publishing Repositories

  • Free: CI tools are free for open source projects
  • Auto-Publishing: CI tools can perform auto-publishing to ensure code is published and tagged as expected every time
  • Auto-merging: CircleCI can re-run many times (cron jobs) which allows for code to automatically be merged
  • Don't have to wait for private package updates: Greenkeeper can submit PRs which enable CI/CD processes for dependent repositories after a new package version is released
  • Don't have to worry about falling behind on dependent packages: Greenkeeper will submit PRs for updated dependent packages
  • No Effort Code Quality Maintenance: Code Quality will be tested tested for every PR submission

Read more about CI Benefits

CI Benefits

Optimizing builds can be approached in many ways beyond what has previously been discussed in this talk.
 

  • Optimizing CI
  • Using Optimization Tools
    • ES-Check,
    • GH-Automerge, and
    • Harmless-Changes

Read more about CI Optimizations

CI Optimizations

In this talk, CI setup and benefits where discussed. There may be a lot of review but the goal of this talk is to provide parity with quick opportunities to speed up developer workflow with CI.

 

Please submit Github issues or pull requests for this talk/subject to:

yowainwright/developer-ci-benefits

 

Help me on Open Source Projects by reaching out to me on Twitter @yowainwright or Github @yowainwright

Summation

Developer CI Benefits

By Jeff Wainwright

Developer CI Benefits

This talk covers basic to conclusive points about implementing CI. It will reference my experiences learning about, implementing, and enjoying CI.

  • 1,194