Continuous Integration and Continuous Deployment for Pinflow
Pinflow, particularly its core application, is a sophisticated system requiring thorough testing and deployment to ensure optimal functionality. To streamline these processes, I employ a Continuous Integration and Continuous Deployment (CI/CD) pipeline, which automates both testing and deployment.
Continuous Integration (CI)
For the Next.js application, testing is conducted using Jest. Each time code is pushed, a GitHub Actions workflow initiates the tests to ensure seamless code integration with the existing platform.
Integration tests are supported by Testcontainers (opens in a new tab), which provisions the necessary PostgreSQL database and the Pinflow Orbit microservice.
Continuous Deployment (CD)
To deploy the application, code changes are only allowed on feature branches. Deployment begins with creating a pull request from a feature branch to the dev
branch. Once the pull request is approved, Railway (opens in a new tab) deploys the application to the staging environment.
A similar process is followed for the main
branch, where approved changes result in the application being deployed to the production environment.