Skip to content

Commit

Permalink
Create codeql.yml (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenegriffin authored Sep 5, 2023
1 parent e864600 commit 3e3c8cb
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '33 10 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ${{ 'windows-latest' }}
timeout-minutes: ${{ 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Machine setup
shell: pwsh
run: ./scripts/machine-setup.ps1

- name: Restore NuGet packages
working-directory: ${{ github.workspace }}
run: |
nuget restore ./MAPIInspector/Source/MAPIInspector.sln
nuget restore ./MAPIInspector/Test/MAPIAutomationTest/MAPIAutomationTest.sln
nuget restore ./FSSHTTPWOPIInspector/Source/FSSHTTPandWOPIInspector.sln
nuget restore ./FSSHTTPWOPIInspector/Test/WOPIautomation/WOPIautomation.sln
- name: "Build MAPIInspector"
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
& $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration="Release" ./MAPIInspector/Source/MAPIInspector.sln
- name: "Build MAPIAutomationTest"
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
& $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration="Release" ./MAPIInspector/Test/MAPIAutomationTest/MAPIAutomationTest.sln
- name: "Build FSSHTTPandWOPIInspector"
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
& $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration="Release" ./FSSHTTPWOPIInspector/Source/FSSHTTPandWOPIInspector.sln
- name: "Build WOPIautomation"
shell: pwsh
run: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
& $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration="Release" ./FSSHTTPWOPIInspector/Test/WOPIautomation/WOPIautomation.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

0 comments on commit 3e3c8cb

Please sign in to comment.