security: adds required pipeline metadata #1203
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate Pull Request | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ 'feature/*', 'main' ] | |
pull_request: | |
branches: [ 'feature/*', 'main' ] | |
permissions: | |
contents: read #those permissions are required to run the codeql analysis | |
actions: read | |
security-events: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
solutionName: Microsoft.Graph.sln | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 6.0.x | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: csharp | |
- name: Restore dependencies | |
run: dotnet restore ${{ env.solutionName }} | |
- name: Build | |
run: dotnet build ${{ env.solutionName }} --no-restore -c Release /p:UseSharedCompilation=false | |
- name: Test | |
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |