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 - GitHub Tutorial
From the course: Learning GitHub Actions: Event-Driven Automation for Your Codebase
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
-
-
-
-
-
-
Plan a custom action2m 16s
-
(Locked)
Your custom action objective1m 3s
-
(Locked)
Dockerfile review1m 28s
-
(Locked)
Add a Dockerfile1m 36s
-
(Locked)
Add an entry-point script39s
-
(Locked)
Use runtime environment resources2m 14s
-
(Locked)
Test an action locally1m 28s
-
(Locked)
Add a metadata file2m 3s
-
(Locked)
Add a README file1m 31s
-
(Locked)
Deploy a custom action1m 21s
-
(Locked)
Publish an action to the GitHub Marketplace3m 7s
-
(Locked)
Solution: Create a custom action1m 39s
-
-