name: CodeQL on: push: branches: [ main ] pull_request: branches: [ main ] jobs: analyze: name: Analyze runs-on: windows-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: [ 'csharp' ] steps: - name: Checkout uses: actions/checkout@v3 - name: Initialize uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} config-file: ./.github/codeql-config.yml - name: Setup uses: actions/setup-dotnet@v1 with: dotnet-version: 7.x.x - name: Restore run: dotnet restore - name: Build run: dotnet build --no-restore --configuration Release /p:UseSharedCompilation=false - name: Test run: dotnet test --no-build --verbosity normal --configuration Release - name: Analyze uses: github/codeql-action/analyze@v2