Shoulder.dev Logo Shoulder.dev

CI/CD Pipelines

What are CI/CD Pipelines?

CI/CD pipelines are automated processes that build, test, and deploy software applications. CI stands for Continuous Integration, which is the practice of merging code changes into a central repository frequently. CD stands for Continuous Deployment or Continuous Delivery, which are both practices of automatically deploying code to production environments.

Why are CI/CD Pipelines important?

CI/CD pipelines are important because they help to:

  • Improve software quality: By automating the testing process, CI/CD pipelines can help to identify and fix bugs earlier in the development cycle.
  • Reduce the risk of deployment failures: By automating the deployment process, CI/CD pipelines can help to reduce the risk of human error.
  • Increase developer productivity: CI/CD pipelines can free up developers to focus on writing code by automating the tasks of building, testing, and deploying applications.

How CI/CD Pipelines work in this project

This project uses GitHub Actions to implement CI/CD pipelines. GitHub Actions is a platform that allows you to automate tasks related to your software development workflow.

CI: Building and testing the code

The ci.yml workflow file in the .github/workflows directory defines the steps for building and testing the code. This workflow is triggered whenever a pull request is opened or a commit is pushed to the main branch.

The workflow starts by installing dependencies, running unit tests, and building the application. If any of these steps fail, the workflow will stop and the pull request will be blocked.

CD: Deploying the code

Once the code has been built and tested successfully, it can be deployed to a production environment. The deploy.yml workflow file in the .github/workflows directory defines the steps for deploying the code to Heroku.

This workflow is triggered manually, allowing for controlled deployments.

How to use CI/CD Pipelines

You can use the CI/CD pipelines in this project to automate the following tasks:

  • Building and testing the code: When you push a change to the main branch, the ci.yml workflow will be triggered automatically, which will build and test your code.
  • Deploying the code: You can trigger the deploy.yml workflow manually to deploy the code to Heroku.

Further information

You can find more information about CI/CD pipelines on the following websites:

Explanation