Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: use workflow_run target for static code analysis
  • Loading branch information
vbreuss committed Mar 13, 2025
commit b8a19a72180ed562daa29701aa6615b61dd3e040
31 changes: 31 additions & 0 deletions .github/workflows/ci-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
workflow_run:
workflows: [ "CI" ]
types:
- completed

jobs:
static-code-analysis:
name: "Static code analysis"
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
env:
REPORTGENERATOR_LICENSE: ${{ secrets.REPORTGENERATOR_LICENSE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
- name: Run sonarcloud analysis
run: ./build.sh CodeAnalysis
23 changes: 0 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,6 @@ jobs:
./Artifacts/*
./TestResults/*.trx

static-code-analysis:
name: "Static code analysis"
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
env:
REPORTGENERATOR_LICENSE: ${{ secrets.REPORTGENERATOR_LICENSE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
- name: Run sonarcloud analysis
run: ./build.sh CodeAnalysis

publish-test-results:
name: "Publish Tests Results"
needs: [ api-tests, unit-tests ]
Expand Down
1 change: 1 addition & 0 deletions System.IO.Abstractions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\ci-analysis.yml = .github\workflows\ci-analysis.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B66A0B3F-6A00-482E-99E2-27D8DECB075E}"
Expand Down