-
Notifications
You must be signed in to change notification settings - Fork 50
51 lines (39 loc) · 1.36 KB
/
validatePullRequest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Validate Pull Request
on:
workflow_dispatch:
push:
branches: [ 'feature/*', 'dev' ,'master' ]
pull_request:
branches: [ 'feature/*', 'dev' ,'master' ]
jobs:
build:
name: Build and Test
runs-on: windows-latest
env:
solutionName: Microsoft.Graph.Core.sln
relativePath: ./src/Microsoft.Graph.Core
steps:
- uses: actions/[email protected]
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 6.0.x
- name: Setup JDK for android targets
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
- name: Install needed dotnet workloads
run: dotnet workload restore ${{ env.solutionName }}
- name: Restore nuget dependencies
run: dotnet restore ${{ env.solutionName }}
- name: Build
run: dotnet build ${{ env.solutionName }} --no-restore -c Debug /p:UseSharedCompilation=false
- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Debug /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2