From cb3c1a54d26f8a7f66afc4b44398fd3db58f4eee Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 18:55:34 +0100 Subject: [PATCH 01/10] Implementing PBI Inspector --- .github/workflows/pbi-inspector.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pbi-inspector.yml diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml new file mode 100644 index 0000000..ce4042d --- /dev/null +++ b/.github/workflows/pbi-inspector.yml @@ -0,0 +1,24 @@ +name: Power BI Inspector CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + run-inspector: + runs-on: windows-latest + + steps: + - name: Checkout your repository + uses: actions/checkout@v4 + + - name: Clone PBI-InspectorV2 + run: git clone https://github.com/NatVanG/PBI-InspectorV2.git inspector + + - name: Run PBI Inspector + shell: pwsh + run: | + Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass + ./inspector/src/cli/Check.ps1 -Path ./CareTogether.pbip -OutputFormat text -FailOnError From 326021969d85f7ed6a0a3c3094649689944de341 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:00:00 +0100 Subject: [PATCH 02/10] Adjusted the pbi-inspector.yml config file --- .github/workflows/pbi-inspector.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index ce4042d..492567a 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -1,24 +1,23 @@ -name: Power BI Inspector CI +name: Run PBI Inspector V2 on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] jobs: - run-inspector: + pbi-inspector: runs-on: windows-latest - steps: - - name: Checkout your repository - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v3 - - name: Clone PBI-InspectorV2 - run: git clone https://github.com/NatVanG/PBI-InspectorV2.git inspector + - name: Download PBI Inspector CLI + run: | + curl -L -o PBIInspectorCLI.zip https://github.com/NatVanG/PBI-InspectorV2/releases/download/v2.3/PBIRInspectorCLI.zip + Expand-Archive PBIInspectorCLI.zip -DestinationPath PBIInspectorCLI - - name: Run PBI Inspector - shell: pwsh + - name: Run PBI Inspector CLI run: | - Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass - ./inspector/src/cli/Check.ps1 -Path ./CareTogether.pbip -OutputFormat text -FailOnError + ./PBIInspectorCLI/PBIRInspectorCLI.exe -fabricitem "./CareTogether.pbip" -rules "./rules/Base-rules.json" -formats "GitHub" -verbose true From 48b56cdfe9e0bfbbc295835440ad3808233fe928 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:07:20 +0100 Subject: [PATCH 03/10] Adjusting the yml file --- .github/workflows/pbi-inspector.yml | 45 ++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index 492567a..eaddc92 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -1,23 +1,40 @@ -name: Run PBI Inspector V2 +name: PBI Inspector Analysis on: push: - branches: - - main + paths: + - '*.pbip' pull_request: + paths: + - '*.pbip' jobs: - pbi-inspector: - runs-on: windows-latest + run-inspector: + runs-on: ubuntu-latest + steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install PBI Inspector + run: | + git clone https://github.com/NatVanG/PBI-InspectorV2.git pbi-inspector + cd pbi-inspector + npm install - - name: Download PBI Inspector CLI - run: | - curl -L -o PBIInspectorCLI.zip https://github.com/NatVanG/PBI-InspectorV2/releases/download/v2.3/PBIRInspectorCLI.zip - Expand-Archive PBIInspectorCLI.zip -DestinationPath PBIInspectorCLI + - name: Run PBI Inspector + run: | + cd pbi-inspector + # Ajuste aqui o caminho para seu arquivo .pbip + node index.js ../CareTogether.pbip --output ../pbi-inspector-report.json - - name: Run PBI Inspector CLI - run: | - ./PBIInspectorCLI/PBIRInspectorCLI.exe -fabricitem "./CareTogether.pbip" -rules "./rules/Base-rules.json" -formats "GitHub" -verbose true + - name: Upload report artifact + uses: actions/upload-artifact@v3 + with: + name: pbi-inspector-report + path: pbi-inspector-report.json From 4e15a13c5c9dac3f347cf1bb67a49cb44b636163 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:11:37 +0100 Subject: [PATCH 04/10] Adjusting the config file --- .github/workflows/pbi-inspector.yml | 32 ++++++++++------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index eaddc92..b094149 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -1,40 +1,30 @@ -name: PBI Inspector Analysis +name: Run PBI Inspector on: push: - paths: - - '*.pbip' pull_request: - paths: - - '*.pbip' jobs: run-inspector: runs-on: ubuntu-latest steps: - - name: Checkout repo + - name: Checkout repository uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v3 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 with: - node-version: '18' + dotnet-version: '7.0.x' - name: Install PBI Inspector - run: | - git clone https://github.com/NatVanG/PBI-InspectorV2.git pbi-inspector - cd pbi-inspector - npm install + run: dotnet tool install --global pbiinspector.cli - - name: Run PBI Inspector - run: | - cd pbi-inspector - # Ajuste aqui o caminho para seu arquivo .pbip - node index.js ../CareTogether.pbip --output ../pbi-inspector-report.json + - name: Run PBI Inspector on pbip file + run: pbiinspector inspect CareTogether.pbip --output result.json - - name: Upload report artifact + - name: Upload result uses: actions/upload-artifact@v3 with: - name: pbi-inspector-report - path: pbi-inspector-report.json + name: pbiinspector-result + path: result.json From c0d010744ff09e8826a64c49c5ff7e5baf8aa780 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:12:38 +0100 Subject: [PATCH 05/10] Adjusting the config file --- .github/workflows/pbi-inspector.yml | 31 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index b094149..e51148c 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -5,26 +5,25 @@ on: pull_request: jobs: - run-inspector: + inspect-pbip: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Setup .NET SDK - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '7.0.x' + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '7.0.x' - - name: Install PBI Inspector - run: dotnet tool install --global pbiinspector.cli + - name: Install PBI Inspector CLI + run: dotnet tool install --global pbiinspector.cli - - name: Run PBI Inspector on pbip file - run: pbiinspector inspect CareTogether.pbip --output result.json + - name: Run PBI Inspector on CareTogether.pbip + run: pbiinspector inspect CareTogether.pbip --output result.json - - name: Upload result - uses: actions/upload-artifact@v3 - with: - name: pbiinspector-result - path: result.json + - name: Upload inspection results + uses: actions/upload-artifact@v4 + with: + name: pbiinspector-result + path: result.json From 32ed400c0e635448805964cb2dead26b93f7f6c7 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:16:07 +0100 Subject: [PATCH 06/10] Adjusting the Config File --- .github/workflows/pbi-inspector.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index e51148c..510d00e 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -11,16 +11,16 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup .NET SDK - uses: actions/setup-dotnet@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - dotnet-version: '7.0.x' + node-version: '18' - - name: Install PBI Inspector CLI - run: dotnet tool install --global pbiinspector.cli + - name: Install PBI Inspector CLI globally + run: npm install -g @natvang/pbi-inspector - name: Run PBI Inspector on CareTogether.pbip - run: pbiinspector inspect CareTogether.pbip --output result.json + run: pbi-inspector inspect ./CareTogether.pbip --output result.json - name: Upload inspection results uses: actions/upload-artifact@v4 From 81532a149bc61a004fc0b3060d92468ad2e9ec09 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:17:21 +0100 Subject: [PATCH 07/10] Adjusting the config file --- .github/workflows/pbi-inspector.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index 510d00e..e6df527 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -11,16 +11,17 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' + - name: Clone PBI Inspector V2 + run: git clone https://github.com/NatVanG/PBI-InspectorV2.git - - name: Install PBI Inspector CLI globally - run: npm install -g @natvang/pbi-inspector + - name: Install PBI Inspector dependencies + working-directory: ./PBI-InspectorV2 + run: npm install - - name: Run PBI Inspector on CareTogether.pbip - run: pbi-inspector inspect ./CareTogether.pbip --output result.json + - name: Run PBI Inspector + working-directory: ./PBI-InspectorV2 + run: | + npx ts-node src/cli.ts inspect ../CareTogether.pbip --output ../result.json - name: Upload inspection results uses: actions/upload-artifact@v4 From d8e9ec385c14d19794af0e3c2dba5dc40f097371 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:18:46 +0100 Subject: [PATCH 08/10] Adjusting the paths --- .github/workflows/pbi-inspector.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index e6df527..4cb8f69 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -1,4 +1,4 @@ -name: Run PBI Inspector +name: PBI Inspector on PBIP on: push: @@ -9,7 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout your repo + uses: actions/checkout@v3 - name: Clone PBI Inspector V2 run: git clone https://github.com/NatVanG/PBI-InspectorV2.git @@ -20,8 +21,7 @@ jobs: - name: Run PBI Inspector working-directory: ./PBI-InspectorV2 - run: | - npx ts-node src/cli.ts inspect ../CareTogether.pbip --output ../result.json + run: npx ts-node src/cli.ts inspect ../CareTogether.pbip --output ../result.json - name: Upload inspection results uses: actions/upload-artifact@v4 From e44d424e18d510903eac4f45370aff20802c1b04 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:20:01 +0100 Subject: [PATCH 09/10] Adjusting the paths --- .github/workflows/pbi-inspector.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index 4cb8f69..caa7269 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -1,30 +1,31 @@ -name: PBI Inspector on PBIP +name: Run PBI Inspector on: push: pull_request: jobs: - inspect-pbip: + inspect: runs-on: ubuntu-latest - steps: - - name: Checkout your repo - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install ts-node globally + run: npm install -g ts-node typescript - name: Clone PBI Inspector V2 run: git clone https://github.com/NatVanG/PBI-InspectorV2.git - - name: Install PBI Inspector dependencies - working-directory: ./PBI-InspectorV2 - run: npm install - - - name: Run PBI Inspector - working-directory: ./PBI-InspectorV2 - run: npx ts-node src/cli.ts inspect ../CareTogether.pbip --output ../result.json + - name: Run PBI Inspector CLI + run: npx ts-node PBI-InspectorV2/src/cli.ts inspect ./CareTogether.pbip --output result.json - - name: Upload inspection results + - name: Upload inspection result uses: actions/upload-artifact@v4 with: - name: pbiinspector-result + name: pbi-inspector-result path: result.json From b35294e1760df8ec1679fd428f2bc3815eb60465 Mon Sep 17 00:00:00 2001 From: marcusgraca Date: Mon, 9 Jun 2025 19:21:44 +0100 Subject: [PATCH 10/10] Adjusting the files --- .github/workflows/pbi-inspector.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pbi-inspector.yml b/.github/workflows/pbi-inspector.yml index caa7269..9211fa4 100644 --- a/.github/workflows/pbi-inspector.yml +++ b/.github/workflows/pbi-inspector.yml @@ -22,7 +22,8 @@ jobs: run: git clone https://github.com/NatVanG/PBI-InspectorV2.git - name: Run PBI Inspector CLI - run: npx ts-node PBI-InspectorV2/src/cli.ts inspect ./CareTogether.pbip --output result.json + working-directory: ./PBI-InspectorV2 + run: npx ts-node src/cli.ts inspect ../CareTogether.pbip --output ../result.json - name: Upload inspection result uses: actions/upload-artifact@v4