From the course: Learning GitHub Actions: Event-Driven Automation for Your Codebase

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Your custom action objective

Your custom action objective

- [Instructor] For our custom action, let's pick something we all know we should do, but often forget. Writing tests. In a Python project, adding tests is easy enough. You create a file that matches a pattern, write a few test functions, and commit the file with your code. But in reality, it's easy to forget that part when you're focused on fixing a bug or adding a new feature. We can use a custom action to help keep us on track. Let's build an action called Test Scout. Every time code is pushed to a repo, this action will scan the repository for test files and generate a short report. If no tests are found, the action can report a warning as a gentle reminder, or it can be more strict and stop the workflow entirely. We'll also add parameters to support different naming conventions so the action can be used with different naming styles. This sounds like a pretty good objective, so let's get coding.

Contents