Failing on Purpose

I failed a test in public today.  Technically, my build on a public repository was set up to fail.  I wanted to see what happens when non-passing code ends up getting checked in.

Failed GitHub Action

One of the many cool things about hosting a project on GitHub is that they have a simple process for setting up automated builds.  One step of building should be running the tests included in the solution.  For the QR project I posted on GitHub to test actions (https://github.com/zimjoe/QRAzureFunctions/wiki) I added tests to check all the validation.

Setting up this step on a GitHub action is very simple.  With one line of YAML, you can kick off the tests. Full source located here: https://github.com/zimjoe/QRAzureFunctions/blob/main/.github/workflows/main_joesazurefunction(integration).yml

- name: Test
run: dotnet test --no-restore --verbosity normal

Now, I don’t have to worry about breaking something I thought to write a test for.  Now I just have to worry about all the stuff I didn’t think of.