From c29b6600e644297b8031fb78d20294b67fa30224 Mon Sep 17 00:00:00 2001 From: Bagus Nur Listiyono <28079733+bagusnl@users.noreply.github.com> Date: Mon, 27 Jan 2025 23:09:31 +0700 Subject: [PATCH] Bring back Qodana scanner neon hated it so much he tried to purged it :) --- .github/workflows/qodana-scan.yml | 66 ++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/.github/workflows/qodana-scan.yml b/.github/workflows/qodana-scan.yml index 4f07589b7..2037d01f5 100644 --- a/.github/workflows/qodana-scan.yml +++ b/.github/workflows/qodana-scan.yml @@ -6,4 +6,68 @@ on: pull_request: branches: - preview - - stable \ No newline at end of file + - stable + +jobs: + qodana: + runs-on: windows-latest + strategy: + matrix: + configuration: [Release] # No need to distribute Debug builds + platform: [x64] + framework: [net9.0-windows10.0.22621.0] + env: + Configuration: ${{ matrix.configuration }} + Platform: ${{ matrix.platform }} + DOTNET_INSTALL_DIR: '.\.dotnet' + DOTNET_VERSION: '9.x' + DOTNET_QUALITY: 'ga' + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages + permissions: + actions: read + contents: write + pull-requests: write + checks: write + security-events: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit + submodules: recursive # many many submodules + # - name: Install winget + # uses: Cyberboss/install-winget@v1 + # - name: Install Qodana CLI + # uses: crazy-max/ghaction-chocolatey@v3 + # with: + # args: install qodana --pre --confirm + + # - name: Verify Qodana + # run: | + # Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1" + # refreshenv + # qodana --version + - name: Install .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + dotnet-quality: ${{ env.DOTNET_QUALITY }} + cache: true + cache-dependency-path: CollapseLauncher/packages.lock.json + # - name: Qodana Scan + # run: | + # Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1" + # refreshenv + # qodana scan --ide QDNET-EAP -o ${{ runner.temp }}\qodana\results --cache-dir ${{ runner.temp }}\qodana\cache + - name: Qodana Scan + uses: JetBrains/qodana-action@v2024.3.3 + continue-on-error: true + with: + args: --ide,QDNET + pr-mode: false + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + - uses: github/codeql-action/upload-sarif@v3 + if: always() + continue-on-error: true + with: + sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json