Skip to content

Commit 61094ca

Browse files
authored
Feature/codeql (#2)
* test minimal CodeQL * test s-a-q query
1 parent 649f0b1 commit 61094ca

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CodeQL Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 8 * * *'
8+
9+
jobs:
10+
analyze:
11+
name: CodeQL Analysis
12+
runs-on: windows-latest
13+
steps:
14+
- name: Checkout repository
15+
id: checkout_repo
16+
uses: actions/checkout@v2
17+
18+
- name: Initialize CodeQL
19+
id: init_codeql
20+
uses: github/codeql-action/init@v1
21+
with:
22+
queries: security-and-quality
23+
24+
- name: Build projects
25+
id: build_projects
26+
shell: pwsh
27+
run: |
28+
$projectsArray = @(
29+
'.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj',
30+
'.\src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj'
31+
)
32+
33+
$projectsArray | ForEach-Object {
34+
dotnet msbuild $PSItem `
35+
/t:restore `
36+
/p:Configuration=Release
37+
38+
dotnet msbuild $PSItem `
39+
/t:build `
40+
/p:Configuration=Release
41+
}
42+
43+
- name: Perform CodeQL Analysis
44+
id: analyze_codeql
45+
uses: github/codeql-action/analyze@v1
46+
47+
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

0 commit comments

Comments
 (0)