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.
Solution: Develop a CI/CD pipeline for a Python script - GitHub Tutorial
From the course: Learning GitHub Actions: Event-Driven Automation for Your Codebase
Solution: Develop a CI/CD pipeline for a Python script
(bright music) - [Instructor] In this challenge, we used GitHub actions to create a three stage CI/CD pipeline for a Python script. The goal was to automate all the steps in a typical software development project, including linting, testing, creating an artifact, and then testing the artifact. Let's go over the solution. The application for this project is just a script that prints a friendly message. Using a simple script is great because we can focus on implementing the pipeline. The Docker file defines a container image that includes the Python script. After putting the code in place, we needed to create a workflow file. It was important to place this file inside the .github/workflows directory, or it wouldn't have been detected by GitHub actions. Let's walk through each job in this workflow. The first job is lint and test. It checks out the code, sets up the Python environment, and checks out the script for formatting. For the test portion of this job, it runs the script directly…
Contents
-
-
-
-
-
(Locked)
Plan your CI/CD pipeline2m 10s
-
(Locked)
Linting and unit tests2m 50s
-
(Locked)
Building and managing artifacts4m 11s
-
(Locked)
Testing with artifacts2m 13s
-
(Locked)
Deploying5m 51s
-
(Locked)
Add a workflow status badge1m 19s
-
(Locked)
Solution: Develop a CI/CD pipeline for a Python script2m 18s
-
(Locked)
-
-