Giter VIP home page Giter VIP logo

dv1c02-code-management-cwf's Introduction

DV1C02-Code-Management-CWF

CI/CD Pipeline

This repository contains a GitHub Actions workflow for setting up a CI/CD pipeline that automates various tasks such as building, testing, analyzing code quality using SonarCloud, and deploying to Netlify.

Workflow Overview

The workflow is triggered on each push to the main branch. It consists of the following steps:

  1. Checkout Repository: This step checks out the repository code for further processing.

  2. Set Up Node.js: Sets up the Node.js environment with the specified version (Node.js 18 in this case).

  3. Install Dependencies: Installs project dependencies using npm install.

  4. Install Mocha: Installs the Mocha testing framework globally.

  5. Run Tests with Mocha: Executes tests using the Mocha framework. You can customize the test command as needed.

  6. Run SonarCloud Analysis: Analyzes code quality using SonarCloud. The projectBaseDir specifies the project directory, and various arguments are provided to configure the analysis.

  7. Deploy to Netlify: Deploys the project to Netlify using the Netlify GitHub Action. The publish-dir specifies the directory to be deployed.

SonarCloud Analysis

The workflow includes a step for running a SonarCloud analysis. To use this step effectively, make sure to provide the necessary environment variables:

  • SONAR_TOKEN: A token to authenticate with SonarCloud.
  • SONAR_ORG: Your SonarCloud organization key.
- name: Run SonarCloud Analysis
  uses: sonarsource/sonarcloud-github-action@master
  with:
    projectBaseDir: . # Adjust to your project's base directory
    args: >
      -Dsonar.projectKey=jabircode_DV1C02-Code-Management-CWF
      -Dsonar.organization=${{ secrets.ORGANIZATION }}
  env:
    SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
    SONAR_ORG: ${{ secrets.ORGANIZATION }}

dv1c02-code-management-cwf's People

Contributors

jabircode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.