Skip to content

Commit ac8701a

Browse files
authored
CodeQL support (#173)
1 parent 8720a78 commit ac8701a

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup .NET Core 5.0 SDK
2323
uses: actions/setup-dotnet@v1
2424
with:
25-
dotnet-version: '5.0.x'
25+
dotnet-version: "5.0.x"
2626
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
2727
env:
2828
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# https://github.com/github/codeql
2+
# https://github.com/github/codeql-action
13
name: CodeQL analysis
24

35
on:
@@ -9,12 +11,32 @@ on:
911
jobs:
1012
analyze:
1113
runs-on: ubuntu-latest
14+
1215
steps:
13-
- uses: actions/checkout@v2
16+
- name: Checkout source
17+
uses: actions/checkout@v2
18+
19+
- name: Setup .NET Core SDK
20+
uses: actions/setup-dotnet@v1
1421
with:
15-
fetch-depth: 2
16-
- uses: github/codeql-action/init@v1
22+
dotnet-version: "5.0.x"
23+
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
24+
env:
25+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v1
1729
with:
30+
queries: security-and-quality
1831
languages: csharp
19-
- uses: github/codeql-action/autobuild@v1
20-
- uses: github/codeql-action/analyze@v1
32+
33+
- name: Install dependencies
34+
working-directory: src
35+
run: dotnet restore -p:GraphQLTestVersion=4.4.0
36+
37+
- name: Build solution
38+
working-directory: src
39+
run: dotnet build --no-restore
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v1

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup .NET Core 5.0 SDK
3131
uses: actions/setup-dotnet@v1
3232
with:
33-
dotnet-version: '5.0.x'
33+
dotnet-version: "5.0.x"
3434
source-url: https://api.nuget.org/v3/index.json
3535
env:
3636
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}}

0 commit comments

Comments
 (0)