Giter VIP home page Giter VIP logo

better-bug-trap's Introduction

Building a better bug trap with GitHub Actions

Manning Twitch stream Jan 12, 2022

Learn how to automate one of the two pieces of Continuous Delivery: always keeping your codebase in a releasable state. We’ll use GitHub actions to explore the lifecycle of a change, discover all the places where bugs can squirm their way in, and learn the best times to run your pipelines for the most effective bug-catching!

Overall goal: Always be in a releasable state (one of the 2 pieces of CD)

Go from a repo with no automation to a repo with:

  • PR based automation
  • Post-merge PR based automation
  • Periodic automation

Setup automation to:

  • Run unit tests

Demonstrate why you need:

  • PR based automation - show getting the repo into a broken state
  • Post-merge based - show example of conflicting changes making main broken
  • Periodic automation - can highlight conflicting changes and catch flakes

What's still missing? (could explore if time)

  • Demonstrating flakes being caught
  • Build image & run system test
  • Release automation (e.g. tag based)
  • Linting

Outline

  1. Repo with a service that gets rates, includes dockerfile
  2. Show a PR that breaks the repo (1_bad_pr)
  3. Add github action to run tests (2_add_pr_tests)
  4. Show how this fixes the original PR problem
  5. Show 2 conflicting PRs and how a bug isn’t caught (3_bad_pr_1, 3_bad_pr_2)
  6. Add periodic action to highlight issue (4_periodic)
  7. Undo conflicting PRs
  8. Open PRs again
  9. Show requiring branch to be up to date (docs)
  10. Explain downsides (many PRs = many updates)
  11. Undo requiring branch to be up to date
  12. Show post merge action (5_post_merge)
  13. Describe merge queues / merge trains (GitHub merge queue docs)

Building and running the image

docker build --tag coin-rates .
docker run -p 80:5000 coin-rates

Accessing in browser:

better-bug-trap's People

Contributors

bobcatfish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.