-
Notifications
You must be signed in to change notification settings - Fork 20
47 lines (38 loc) · 1.48 KB
/
on-push-verification.yml
File metadata and controls
47 lines (38 loc) · 1.48 KB
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
# sample-workflow-windows-latest
# docs are in the repo
name: Code Analysis on-push-verification windows-latest
on: push
jobs:
sample:
name: .NET Code Analysis runner
# .NET Code Analysis runs on windows-latest.
# ubuntu-latest and macos-latest supporting coming soon
runs-on: windows-latest
steps:
# Checkout your code repository to scan
- uses: actions/checkout@v2
# Ensure compatible versions of dotnet are installed.
# The [Microsoft Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
# A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
# Remote agents already have a compatible version of dotnet installed and this step may be skipped.
# For local agents, ensure dotnet version 3.1.201 or later is installed by including this action:
# - uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '3.1.x'
# Run NuGet restore
- name: Run NuGet restore
run: dotnet restore .\sample\ClassLibrary1.sln
# Run .NET Code Analysis
- name: Run .NET Code Analysis
uses: ./
id: code-analysis
with:
project: .\sample\ClassLibrary1.sln
build-breaking: false
all-categories: all
# Upload the analysis results file
- name: Upload analysis results
uses: actions/upload-artifact@v2
with:
name: analysis_results.sarif
path: ${{ steps.code-analysis.outputs.sarifFile }}