From 6323f43db46c487517b2d529433daa0370f8d15a Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Sun, 7 Dec 2025 18:34:06 -0800 Subject: [PATCH] chore: Update .github workflows for .NET version and action dependencies; add Qodana scan job --- .github/workflows/Publish.yml | 28 ++++++++++++++++++++++------ lib/averages/hma/Hma.Tests.cs | 4 ---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index d5a43f98..e513f950 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -25,7 +25,7 @@ permissions: security-events: write # Required for CodeQL analysis and uploading SARIF results env: - DOTNET_VERSION: '8.x' + DOTNET_VERSION: '10.x' DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: true @@ -151,17 +151,33 @@ jobs: run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" - name: Upload Coverage to Codacy - uses: codacy/codacy-coverage-reporter-action@v1 + uses: codacy/codacy-coverage-reporter-action@v1.3.0 with: project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} coverage-reports: '*cover*.xml' - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: 'cover*' verbose: true + Qodana: + timeout-minutes: 15 + runs-on: ubuntu-latest + permissions: + contents: write + checks: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2024.3.4 + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + CodeQL: timeout-minutes: 30 runs-on: ubuntu-latest @@ -246,7 +262,7 @@ jobs: build_publish: timeout-minutes: 20 - needs: [Code_Coverage, CodeQL] + needs: [Code_Coverage, CodeQL, Qodana] if: | success() && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')) || @@ -265,14 +281,14 @@ jobs: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0 + uses: gittools/actions/gitversion/setup@v3.1.11 with: versionSpec: '6.x' includePrerelease: true - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0 + uses: gittools/actions/gitversion/execute@v3.1.11 with: useConfigFile: true updateAssemblyInfo: false diff --git a/lib/averages/hma/Hma.Tests.cs b/lib/averages/hma/Hma.Tests.cs index f50bff4f..46d30204 100644 --- a/lib/averages/hma/Hma.Tests.cs +++ b/lib/averages/hma/Hma.Tests.cs @@ -1,7 +1,3 @@ -using System; -using System.Linq; -using Xunit; - namespace QuanTAlib.Tests; public class HmaTests