If you want to get better at CI/CD, reading about pipelines isn’t enough. You need to run them, break them, fix them, and observe what actually happens when builds fail.
The good news: you don’t need Kubernetes, microservices, or a production-scale system to practice CI/CD properly. You need a small project, automated tests, and a CI pipeline that runs on every commit.
This guide walks through a practical, hands-on way to learn CI/CD with a focus on test automation.
Start With a Small Project
Pick something simple:
- A small Node.js API
- A Python Flask app
- A Go service
- A CLI tool
The stack doesn’t matter. What matters is that your project has:
- A build step
- Automated tests
- A dependency file
- A lock file
Your goal isn’t to ship features. Your goal is to understand how automated pipelines behave.
Add Automated Tests First
CI/CD without tests is just automation.
Start with:
- Unit tests for core logic
- A few integration tests if possible
Make sure tests can run locally with one command:
npm test
or
pytest
or
go test ./...
If tests are hard to run locally, they’ll be harder to run in CI.
Add a CI Pipeline
Once tests run locally, connect your repository to a CI system like Semaphore.
A minimal pipeline should:
- Check out the code
- Install dependencies
- Run tests
version: v1.0
name: CI Pipeline
blocks:
- name: Run Tests
task:
jobs:
- name: Install and Test
commands:
- checkout
- npm ci
- npm test
That’s enough to start practicing real CI.
Semaphore runs each job in a clean environment, which is exactly what you want when learning.
Intentionally Break Things
This is where real learning happens.
Try these experiments:
- Remove a dependency declaration. Does CI fail? Why?
- Delete the lock file. Do versions drift?
- Add an environment variable locally but not in CI. What breaks?
- Introduce a flaky test. Does it fail intermittently?
Practicing CI/CD means observing how reproducible environments behave differently from your laptop.
Learn From Test Reports
Most CI systems, including Semaphore, provide test reports and logs.
Use them.
- Which tests are slow?
- Which tests are flaky?
- How long does dependency installation take?
- Where does the build fail?
Semaphore test reports documentation:
https://docs.semaphore.io/using-semaphore/tests/test-reports/
This is where CI becomes more than “just running tests.”
Add Basic Deployment
Once testing works reliably:
- Deploy to a staging environment
- Use a simple script
- Automate it after tests pass
This helps you understand:
- Pipeline sequencing
- Failure handling
- Rollbacks
- Environment configuration
Even deploying to a container or temporary server is enough to learn.
Practice Reproducibility
CI/CD is fundamentally about reproducibility.
To practice this:
- Commit lock files
- Use deterministic install commands (
npm ci, notnpm install) - Align local and CI environments
- Use defined machine types
Semaphore machine types documentation:
https://docs.semaphore.io/using-semaphore/machine-types/
When your pipeline is reproducible, your confidence increases.
Common Mistakes When Practicing CI/CD
- Skipping tests
- Treating CI as a black box
- Ignoring flaky tests
- Not committing lock files
- Only running pipelines on the main branch
Learning accelerates when you intentionally observe failures.
What “Good” Looks Like
- You can explain why a build failed
- You can reproduce CI failures locally
- Your tests are deterministic
- Your dependency graph is stable
- You trust the pipeline
At that point, CI stops being mysterious infrastructure and becomes a development tool.
Summary
The best way to practice CI/CD hands-on is to start small, automate tests, run them in a clean CI environment, and deliberately break things to understand failure modes.
CI/CD is not about complex YAML files. It’s about reproducibility, automated testing, and fast feedback loops.
FAQ
Do I need a production system to practice CI/CD?
No. A small personal project with tests is enough.
What’s the most important part of CI/CD to learn first?
Automated testing and reproducible builds.
Should beginners learn deployment automation immediately?
Start with testing pipelines. Add deployment after you understand failure handling.
How long does it take to get comfortable with CI/CD?
Once you’ve broken and fixed a few pipelines yourself, it becomes much clearer.
Want to discuss this article? Join our Discord.