-
Notifications
You must be signed in to change notification settings - Fork 1
CircleCI ‐ Continuous Integration Testing Tool
Mahfuz Anam edited this page Nov 10, 2024
·
1 revision
CircleCI is a popular Continuous Integration and Continuous Delivery (CI/CD) platform that automates the software development process, allowing teams to build, test, and deploy code more efficiently. It integrates with version control systems like GitHub, Bitbucket, and GitLab, making it easy to automate workflows. CircleCI offers both cloud-based and self-hosted options, allowing developers to automate their pipelines on their preferred infrastructure.
Key features of CircleCI include:
- Automating the build, test, and deployment stages of a project.
- Configuring workflows with a simple YAML file.
- Extensive support for parallel job execution and caching for faster builds.
- Deep integration with Docker, Kubernetes, and cloud platforms (AWS, GCP, etc.).
- A code repository hosted on a supported VCS (GitHub, GitLab, Bitbucket).
- Administrator access to the repository.
- Go to the CircleCI website and sign up using your GitHub or Bitbucket account.
- Once logged in, select your repository from the CircleCI dashboard to set up your first project.
- CircleCI will automatically detect the repository and ask for permissions to access it.
- The core of a CircleCI pipeline is the
config.yml
file, which defines the steps for building, testing, and deploying your project. - Create a
.circleci
directory at the root of your project, then add aconfig.yml
file inside it.
version: 2.1 # CircleCI configuration version
jobs:
build: # Define a job called 'build'
docker: # Use Docker image for the build
- image: circleci/python:3.8
steps:
- checkout # Pull the code from your repository
- run:
name: Install Dependencies
command: pip install -r requirements.txt
- run:
name: Run Tests
command: pytest
workflows:
version: 2
build_and_test:
jobs:
- build
- After creating the
.circleci/config.yml
, commit and push this file to the main branch of your repository. - CircleCI will automatically trigger the pipeline and start running the defined jobs (build, test, etc.).
- Navigate to the CircleCI dashboard, where you can see your project's pipeline execution.
- Each job and step of the pipeline will be visualized, and you can check logs for debugging.