Skip to main content
In this guide, we’ll design a CI/CD pipeline for a Node.js application using GitHub Actions. Automating each stage ensures consistent builds, rapid feedback, and reliable deployments across development and production clusters.

Pipeline Overview


1. Source Checkout

Begin by checking out your repository so that all subsequent jobs have access to your code.

2. Unit Testing

Install dependencies, execute your test suite, and archive the results. The pipeline will fail on any test errors.
Use npm ci in CI environments for a clean, deterministic install.

3. Code Coverage

Run coverage in parallel with unit tests. We ignore coverage thresholds to avoid pipeline failures but still collect the reports.
Storing coverage artifacts helps you track trends over time, even if errors are ignored.

4. Containerization

Build your Docker image, perform a quick smoke test inside a container, and push it to your Docker registry.

5. Deploy to Development Cluster

Apply Kubernetes manifests to your development cluster and capture the Ingress hostname.

6. Integration Testing on Dev

Verify that the application is live on the development endpoint.

7. Manual Approval

Pause the workflow until a reviewer manually approves the release. On rejection, the pipeline stops.
Ensure that the reviewer has access to both the GitHub repo and any relevant sprint boards before approving.

8. Deploy to Production Cluster

Once approved, deploy the same manifests to your production context.

9. Post-Deployment Integration Tests

Perform final checks against the production endpoint to validate a successful release.

Watch Video