Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CodeQL without building the solution #17473

Merged
merged 7 commits into from
Nov 9, 2024
Merged
Changes from all commits
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
21 changes: 5 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ jobs:
matrix:
include:
- language: csharp
build-mode: manual
build-mode: none
- language: javascript-typescript
build-mode: none

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# We use the setup-dotnet action to set up .NET Core, otherwise the CodeQL CLI will not work with preview versions.
- name: Setup .NET from global.json
uses: actions/setup-dotnet@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -63,19 +65,6 @@ jobs:
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/config/codeql-config.yml

- if: matrix.build-mode == 'manual'
name: Use .NET ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnetVersion }}
dotnet-quality: ${{ env.dotnetIncludePreviewVersions }}

- if: matrix.build-mode == 'manual'
shell: bash
run: |
dotnet restore ${{ env.solution }}
dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:ContinuousIntegrationBuild=true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
Expand Down
Loading