From 35633d9ec70883d80df728e0422bc6d42e398ca1 Mon Sep 17 00:00:00 2001 From: Aleksandar Ivanov <74899441+aleks-ivanov@users.noreply.github.com> Date: Fri, 25 Jun 2021 17:38:45 +0300 Subject: [PATCH] Create CodeQL pipeline (#2) --- .github/workflows/codeql-analysis.yml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f2a0882 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,46 @@ +name: CodeQL Analysis + +on: + push: + pull_request: + schedule: + - cron: '0 8 * * *' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: windows-latest + strategy: + matrix: + projects: [ + 'Microsoft.Diagnostics.Tracing\EventSource\EventSource.sln', + 'Microsoft.Diagnostics.Tracing\TraceEvent\TraceEvent.sln', + 'System.Numerics\SIMD\System.Numerics.Vectors.SampleCode.sln', + 'System.Reflection.Metadata\MdDumper\MdDumper.csproj', + 'WinForms-HDPI\PerMonitorAware\PerMonitorDemo.sln', + 'WinForms-HDPI\SystemAware\HighDpiDemo.sln' + ] + steps: + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: csharp + queries: security-and-quality + + - name: Build project + continue-on-error: true + run: | + nuget restore ${{ matrix.projects }} + msbuild ${{ matrix.projects }} /p:UseSharedCompilation=false + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + +# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)