-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.19 KB
/
Copy pathci.yml
File metadata and controls
47 lines (38 loc) · 1.19 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
name: Build & Test
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
global-json-file: global.json
- name: Restore
run: dotnet restore IronTrace.sln
- name: Build
run: dotnet build IronTrace.sln -c Release --no-restore
- name: Test
run: dotnet test IronTrace.sln -c Release --no-build --verbosity normal
- name: Vulnerable package scan
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$output = dotnet list IronTrace.sln package --vulnerable --include-transitive 2>&1 | Out-String
Write-Host $output
if ($output -match '(?i)\b(Critical|High)\b') {
Write-Error 'High or Critical NuGet vulnerabilities detected.'
exit 1
}