...

/

Integrating with GitHub Actions

Integrating with GitHub Actions

Learn how to leverage testing coverage thresholds inside GitHub Actions.

GitHub Actions is a tool offered by GitHub that automates software workflows for us. Using YAML files, we can create rules around merging pull requests to the main branch, run workflows after a merge is complete, and even deploy our applications. For instance, we may want to ensure that our code can still successfully build with the new code in a pull request. We can enforce this with GitHub Actions, blocking the merge of a pull request by building our system, and blocking the merge if it fails.

How can we use testing coverage inside GitHub Actions?

Tests prove to us that even as we add features to and iterate upon our codebase, our code still works as expected. Tests ensure that our change in one file hasn't accidentally broken something in another and that this edge case is still properly handled on the side. We always want to make sure that our tests are passing before merging in code. Any tests that are not passing need to be addressed, either by fixing the code or fixing the test, depending on the changes made.

When we are moving quickly and under the pressure of timelines, tests can sometimes move to the mental back burner. This is understandable but poses a risk to the ...