diff --git a/.github/workflows/ci-analysis.yml b/.github/workflows/ci-analysis.yml new file mode 100644 index 000000000..cec7fc733 --- /dev/null +++ b/.github/workflows/ci-analysis.yml @@ -0,0 +1,32 @@ +name: CI-Analysis + +on: + workflow_dispatch: + 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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb1cd2dc1..567e9dea3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 ] diff --git a/System.IO.Abstractions.sln b/System.IO.Abstractions.sln index ac426769d..169503191 100644 --- a/System.IO.Abstractions.sln +++ b/System.IO.Abstractions.sln @@ -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}"