Skip to content

CodeQL

CodeQL #80

Workflow file for this run

name: CodeQL
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
- cron: "42 8 * * 1"
workflow_dispatch:
jobs:
analyze:
strategy:
fail-fast: false
matrix:
language: ["csharp"]
configuration: [Release]
permissions:
actions: read
contents: read
security-events: write
env:
Solution_Name: source/BulkCrapUninstaller.sln
Test_Project_Path: source/BulkCrapUninstallerTests/BulkCrapUninstallerTests.csproj
runs-on: "windows-latest"
timeout-minutes: 120
name: Analyze
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Build
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"