-
Notifications
You must be signed in to change notification settings - Fork 32
50 lines (47 loc) · 1.58 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
50
name: Validate Pull Request
on:
workflow_dispatch:
push:
branches: [ 'feature/5.0', 'master' ]
pull_request:
branches: [ 'feature/5.0', 'master' ]
jobs:
build:
runs-on: ubuntu-latest
env:
solutionName: Microsoft.Graph.Beta.sln
projectName: src/Microsoft.Graph/Microsoft.Graph.Beta.csproj
steps:
- uses: actions/[email protected]
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 7.x
- name: Restore dependencies
run: dotnet restore ${{ env.solutionName }}
- name: Build for netstandard2.0
run: dotnet build ${{ env.projectName }} -f netstandard2.0 --no-restore -c Release
- name: Build for netstandard2.1
run: dotnet build ${{ env.projectName }} -f netstandard2.1 --no-restore -c Release
- name: Build
run: dotnet build ${{ env.solutionName }} --no-restore -c Release
- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2