Configure Your GitHub CI Pipeline

DCode integrates directly with your CI pipeline to ingest code-quality reports automatically whenever you push changes to your repository. We recommend using Designite’s GitHub Actions to run the analysis. The actions use the Designite tools, which detect a broad set of architecture, design, testability, test, and implementation smells, compute relevant object-oriented quality metrics, and upload the results as build artifacts.

When configured, the Actions log analysis results directly to DCode. DCode ingests those reports, automatically tracks and visualizes trends over time, monitors the project’s code health, and surfaces data-driven insights to help engineering teams prioritize technical debt.

1. Obtain Personal access token and add it to GitHub secrets

  • Create a new personal access token for your GitHub repository by navigating to your account’s user menu (top right) → SettingsDeveloper settingsPersonal access tokens. Create a new token, and if using a fine-grained token, ensure read access to Actions, Code, and Metadata.

  • Add the token to your repository’s secrets by going to the repository’s SettingsSecrets and variablesActions. Create a new secret, paste the token into the Value field, and assign a meaningful name (e.g., PAT).

2. Add your Designite license key to secrets (optional)

If you have a Designite Professional or Academic license key, add it to your repository’s GitHub secrets as D_KEY. This key enables the analysis of large projects.

3. Add your DCode project credentials to secrets

Create a new project in DCode, if not exists yet, and retrieve the project-id and api-key from the Settings menu (accessible via the three dots on the project card). Add these values to your repository’s GitHub secrets as PROJECT_ID and API_KEY. This setup allows your code quality analysis reports to be automatically logged to your DCode project, where you can monitor trends and track code health.

4. Add a GitHub Actions workflow file

This is the last and very crucial step. Create a folder .github on your root directory of the project and create workflows folder inside the .github folder. Create a workflow file (say actions.yml) in the newly created workflows folder. The contents of the action.yml file depend upon your project language, the used GitHub Action, and tasks.

4.1. C#

A sample action file for a C# project is provided below.

name: CI

on:
push:
    branches: [ main ]
pull_request:
    branches: [ main ]

jobs:
analyze:
    runs-on: windows-latest
    steps:
    - name: DesigniteAction
        uses: DesigniteTools/designite_action@v1.4.0
        with:
            PAT: ${{ secrets.PAT }}
            PROJECT_ID: ${{ secrets.PROJECT_ID }}
            API_KEY: ${{ secrets.API_KEY }}
            D_KEY: ${{ secrets.D_KEY }}
            FOLDER_PATH: 'src'

You can update the action’s version number to the latest available release. You may find Designite action for C# on GitHub Marketplace.

4.2. Java

A sample action file for a Java project is provided below.

name: DesigniteJava code quality

on:
push:
    branches: [ main ]
pull_request:
    branches: [ main ]

jobs:
build:
    runs-on: ubuntu-latest
    steps:
    - name: DesigniteJava_action
    uses: DesigniteTools/DJAction@v2.2.0
    with:
        PAT: ${{ secrets.PAT }}
        PROJECT_ID: ${{ secrets.PROJECT_ID }}
        API_KEY: ${{ secrets.API_KEY }}

You can update the action’s version number to the latest available release. You may find Designite action for Java on GitHub Marketplace.

4.3. Python

A sample action file for a Python project is provided below.

name: DPy Code Quality

on:
push:
    branches: [main]
pull_request:
    branches: [main]

jobs:
quality:
    runs-on: ubuntu-latest
    steps:
    - name: DPy Action
        uses: DesigniteTools/DPyAction@v1.2.1
        with:
        PAT: ${{ secrets.PAT }}
        PROJECT_ID: ${{ secrets.PROJECT_ID }}
        API_KEY: ${{ secrets.API_KEY }}

You can update the action’s version number to the latest available release. You may find Designite action for Python on GitHub Marketplace.

What you’ll get

Once configured, your repository will be analyzed automatically for each event defined in your workflow file. In the examples above, the analysis runs on every push or pull request to the main branch. The generated report is stored as a GitHub Actions artifact, which you can download at any time to review detected code smells and detailed quality metrics for deeper inspection. Most importantly, with the above CI configuration, you can use DCode to automatically track code quality trends over time—helping you monitor improvements, and make informed engineering decisions.