Skip to content

Commit 89d4914

Browse files
committed
Capture logs from InspectCode/CleanupCode
1 parent 0509424 commit 89d4914

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,13 @@ jobs:
206206
run: |
207207
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
208208
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
209-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
209+
dotnet jb inspectcode JsonApiDotNetCore.sln --build --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --severity=WARNING --verbosity=TRACE --LogFolder=$env:RUNNER_TEMP/inspect-code-logs --debug -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
210+
- name: Upload logs to artifacts
211+
if: always()
212+
uses: actions/upload-artifact@v4
213+
with:
214+
name: inspect-code-logs-${{ matrix.os }}
215+
path: ${{ runner.temp }}/inspect-code-logs
210216
- name: Verify outcome
211217
shell: pwsh
212218
run: |
@@ -271,13 +277,19 @@ jobs:
271277
$baseCommitHash = git rev-parse HEAD~1
272278
273279
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
274-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
280+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=TRACE --jb --LogFolder=$env:RUNNER_TEMP/cleanup-code-logs --jb --debug -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
275281
- name: CleanupCode (on branch)
276282
if: github.event_name == 'push' || github.event_name == 'release'
277283
shell: pwsh
278284
run: |
279285
Write-Output "Running code cleanup on all files."
280-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=WARN --fail-on-diff --print-diff
286+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --verbosity=TRACE --jb --LogFolder=$env:RUNNER_TEMP/cleanup-code-logs --jb --debug --fail-on-diff --print-diff
287+
- name: Upload logs to artifacts
288+
if: always()
289+
uses: actions/upload-artifact@v4
290+
with:
291+
name: cleanup-code-logs-${{ matrix.os }}
292+
path: ${{ runner.temp }}/cleanup-code-logs
281293

282294
publish:
283295
timeout-minutes: 60

0 commit comments

Comments
 (0)