-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (55 loc) · 1.75 KB
/
ci-audit.yml
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
name: CI-Audit
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
ContinuousIntegrationBuild: true
CiRunNumber: ${{ github.run_number }}
CiRunMainSuffix: ci${{ github.run_number }}
CiRunPullSuffix: pull-${{ github.event.number }}-ci${{ github.run_number }}
jobs:
audit:
strategy:
fail-fast: false
matrix:
configuration: [debug, release]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
test-filter: --filter TestCategory!=DriverDependent
- os: windows-latest
configuration: release
collect-packages: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration ${{ matrix.configuration }}
- name: Test
run: dotnet test --no-build --configuration ${{ matrix.configuration }} ${{ matrix.test-filter }}
- name: Pack
id: pack
if: matrix.collect-packages
env:
CiBuildVersionSuffix: ${{ github.ref_name == 'main' && env.CiRunMainSuffix || env.CiRunPullSuffix }}
run: dotnet pack --no-build --configuration ${{ matrix.configuration }}
- name: Collect packages
uses: actions/upload-artifact@v4
if: matrix.collect-packages && steps.pack.outcome == 'success' && always()
with:
name: Packages
if-no-files-found: error
path: artifacts/package/${{matrix.configuration}}/**