CI/CD pipeline templates
Configure production-grade continuous integration quality gates for your Power BI Project (PBIP) and TMDL models. Download ready-to-use workflows for GitHub Actions, Azure DevOps Pipelines, GitLab CI, and developer pre-commit hooks.
Preview: these templates call the BIKit CLI, which is not published to npm yet. Use them as a starting point and expect to adapt the lint step until the first release.
Pipeline Configuration
Create the file .github/workflows/powerbi-quality-gate.yml in your repository root.
Whenever developers open a Pull Request modifying *.tmdl files, BIKit Lite executes automatically, evaluating rules and protecting production models.
name: Power BI TMDL Quality Gate & PR Review
on:
pull_request:
branches: [ main ]
paths:
- '**/*.tmdl'
- '**/model.bim'
- '.bikitrc.json'
push:
branches: [ main ]
jobs:
bikit-lint:
name: Lint Semantic Model (BIKit)
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # Required for posting PR quality comments
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Execute BIKit TMDL Static Analysis
id: bikit
run: |
npx bikit lint "./semantic-model/definition" \
--min-score=80 \
--fail-on=error \
--format=json > bikit-results.json || true
cat bikit-results.json
- name: Format PR Quality Review Comment
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
if (!fs.existsSync('bikit-results.json')) return;
const res = JSON.parse(fs.readFileSync('bikit-results.json', 'utf8'));
const badge = res.passed ? '✅ **PASSED**' : '❌ **FAILED**';
let comment = `### ${badge} — Power BI Engineering Quality Gate\n\n`;
comment += `* **Architecture Score**: \`${res.score}/100\` (Threshold: \`80\`)\n`;
comment += `* **Findings**: \`${res.summary.critical}\` Critical · \`${res.summary.warning}\` Warning · \`${res.summary.info}\` Info\n\n`;
if (res.issues.length > 0) {
comment += `| Severity | Rule | Location | Description |\n| :--- | :--- | :--- | :--- |\n`;
for (const iss of res.issues.slice(0, 10)) {
comment += `| \`${iss.severity}\` | \`${iss.ruleId}\` | \`${iss.file}:${iss.line}\` | ${iss.message} |\n`;
}
}
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
- name: Enforce Pipeline Exit Status
run: |
node -e "
const res = require('./bikit-results.json');
if (!res.passed) {
console.error('❌ BIKit quality check failed score threshold (80).');
process.exit(1);
}
console.log('✅ BIKit quality check passed.');
"
Need Custom Azure DevOps Pipelines & Fabric Deployment Automation?
I help data teams implement automated deployment pipelines, configure Service Principal permissions across Fabric workspaces, and enforce peer review gates.
Privacy: the analysis runs in your browser and your settings never leaves it. I only count that the tool was used and when a report is downloaded — no inputs, results or personal data are recorded.
Get the next Engineering Note
Practical DAX, semantic model and Fabric notes. 1–2 a month, unsubscribe any time.
Treating Semantic Models as Mission-Critical Software
Automated PR Review Gates
Prevent syntax regressions, Cartesian joins, and unindexed iterators from ever merging into production branches.
Multi-Platform Compatibility
Tested configurations for GitHub Actions, Azure DevOps Pipelines, GitLab CI, and local developer pre-commit Git hooks.
Fabric Git Synchronization
Trigger automated workspace updates via Fabric REST APIs as soon as a reviewed pull request merges into release branches.
Frequently Asked Questions About Power BI CI/CD
Why do I need a CI/CD pipeline for Power BI?
Historically, Power BI was managed via opaque binary .pbix files with manual publishing, leading to overwrite collisions, missing change history, and untested production bugs. By saving models as PBIP / TMDL and running CI/CD pipelines, every measure and relationship change is peer-reviewed and statically validated before deployment.
Does BIKit require a dedicated build server or runner?
No. BIKit Lite runs on any standard Node.js (18+) environment, including free GitHub Actions Ubuntu runners and Azure DevOps hosted agents. It executes in seconds without requiring a Windows virtual machine.
How does the GitHub Actions automated PR comment work?
When a developer opens a pull request that modifies `*.tmdl` files, BIKit executes and exports structured JSON findings. The GitHub Script action reads the results and posts an automated markdown comment listing specific rule violations and line numbers directly on the PR.
Can we fail builds only on critical errors while allowing warnings?
Yes. Using the `--fail-on=error` flag ensures that advisory suggestions (such as missing measure descriptions or formatting hints) do not break the build, while critical issues (like DAX context transitions or bidirectional cross-filtering) block the merge.