-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (60 loc) · 2.54 KB
/
Copy pathci.yml
File metadata and controls
77 lines (60 loc) · 2.54 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
windows:
name: windows-${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.0
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 10.0.101
- name: Verify installer security invariants on Windows PowerShell 5.1
shell: powershell
run: ./scripts/tests/Test-Installer.ps1
- name: Verify RFC 3161 signer binding on PowerShell 7
shell: pwsh
run: ./scripts/tests/Test-Rfc3161Timestamp.ps1
- name: Restore
run: dotnet restore PortCVE.sln --locked-mode
- name: Verify formatting
run: dotnet format PortCVE.sln --verify-no-changes --no-restore
- name: Build
run: dotnet build PortCVE.sln -c Release --no-restore
- name: Test
run: dotnet test PortCVE.sln -c Release --no-build --logger "trx;LogFileName=tests.trx" --collect "XPlat Code Coverage" --results-directory TestResults
- name: Publish Windows x64
run: dotnet publish src/PortCVE/PortCVE.csproj -c Release -r win-x64 --self-contained true --no-build -o artifacts/win-x64
- name: Smoke test
shell: pwsh
run: |
./artifacts/win-x64/portcve.exe --version
$json = ./artifacts/win-x64/portcve.exe snapshot --no-firewall 2>$null | ConvertFrom-Json
if ($json.schema_version -ne 1) { throw 'Unexpected snapshot schema.' }
- name: Verify authorized remote loopback workflow
shell: powershell
run: ./scripts/Test-RemoteHostIntegration.ps1 -SkipBuild -PortCVEPath ./artifacts/win-x64/portcve.exe
- name: Verify daily-workflow performance budgets
shell: powershell
run: ./scripts/Test-Performance.ps1 -PortCVEPath ./artifacts/win-x64/portcve.exe -LocalIterations 5 -RemotePortCount 256 -EnforceBudgets
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.0
with:
name: test-results-${{ matrix.os }}
path: TestResults/
- name: Upload smoke artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.0
with:
name: portcve-win-x64-${{ matrix.os }}
path: artifacts/win-x64/portcve.exe