Build Your First CI/CD Pipeline with GitHub Actions
Automate Python testing that runs on every push - so bugs get caught before users find them
Difficulty
Beginner
Time to complete
30 minutes
Availability
Free
BUILD
What you'll build
Create a GitHub Actions CI/CD pipeline that automatically tests your Python code. Learn pytest, workflow configuration, and the same automation patterns used by Netflix and Spotify.
1. Set Up Your Python Project
Fork and clone the starter repo, create a virtual environment, and install dependencies.
2. Write Code and Tests
Add a multiply function to the codebase and write pytest tests to verify it works.
3. Build Your CI Pipeline
Create a GitHub Actions workflow that runs tests automatically on every push.
4. Push and Watch It Run
Commit your changes, push to GitHub, and watch the pipeline execute automatically.
5. Break and Fix a Test
Intentionally fail a test to see how CI catches bugs before they reach production.
Your portfolio builds as you work.
Every project documents itself as you go. Finish the work, and your proof is ready to share.
PROJECT
Real world application
Skills you'll learn
-
Git Version Control
Fork repos, clone locally, commit changes, and push to GitHub
-
Python Development
Write functions with type hints and manage virtual environments
-
Automated Testing
Create pytest tests that validate your code works correctly
-
CI/CD Pipelines
Build workflows that run automatically when code changes
-
GitHub Actions
Configure YAML workflows that spin up Linux servers on demand
-
Build Debugging
Break a test intentionally and watch the pipeline catch the bug
Tech stack
-
GitHub Actions
GitHub native CI/CD platform that automates testing and deployment directly in your repository.
-
Python
Popular programming language used for web development, automation, and data science.
I always wondered how big tech companies test code automatically. This project made it click - now I set up CI/CD for every personal project. No more broken main branch!
Alex Rivera
Junior Developer
OUTCOME
Where this leads.
Relevant Jobs
Roles where these skills matter:
- Junior DevOps Engineer
- Software Developer
- QA Automation Engineer
- Platform Engineer
CI/CD with AI Series
Continue your CI/CD journey. In Part 2, add AI code review to automatically analyze pull requests before they merge.
CI/CD with AI Series
Continue the JourneyFAQs
Everything you need to know
This is Part 1 of the 4-part CI/CD with AI Series. Start here to learn the fundamentals, then continue with Part 2: AI Code Review on Every PR to add AI-powered pull request analysis. Parts 3 and 4 are coming soon.
CI/CD stands for Continuous Integration/Continuous Deployment. It automatically tests and deploys code whenever changes are pushed. Netflix, Spotify, and Stripe all use CI/CD to catch bugs before they reach users. When you push code, a server automatically runs your tests - if they fail, you know immediately. No more 'it works on my machine' surprises.
GitHub Actions is GitHub's built-in CI/CD platform. It's the most popular choice for open source projects because it's free for public repos and requires zero additional setup - your code and pipelines live in the same place. Learning GitHub Actions opens doors to DevOps Engineer, Site Reliability Engineer, and Platform Engineer roles.
pytest is Python's most popular testing framework. You write simple functions that check if your code works correctly using assert statements. For example, assert multiply(3, 4) == 12 checks that your multiply function returns the right answer. If any assertion fails, pytest reports exactly which test broke and why.
This project is beginner-friendly with step-by-step instructions. You will write simple Python functions and tests, but the project guides you through every line. No prior Python, Git, or DevOps experience required. If you can follow instructions and copy-paste code, you can complete this project.
This project is completely free. GitHub Actions provides unlimited free minutes for public repositories. All tools used - GitHub, Python, pytest, Cursor IDE - are free. You will not need a credit card or paid account for anything.
One Project. Real Skills.
30 minutes from now, you'll have completed Build Your First CI/CD Pipeline with GitHub Actions. No prior experience needed. Just step-by-step guidance and a real project for your portfolio.
Beginner-friendly