Skip to content

Merge pull request #721 from microsoftgraph/dependabot/github_actions… #717

Merge pull request #721 from microsoftgraph/dependabot/github_actions…

Merge pull request #721 from microsoftgraph/dependabot/github_actions… #717

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