-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (52 loc) · 1.26 KB
/
build.yml
File metadata and controls
61 lines (52 loc) · 1.26 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
name: build
on:
push:
branches:
- "main"
paths:
- ".github/workflows/build.yml"
- "src/**"
- "test/**"
- "util/**"
pull_request:
branches:
- "main"
paths:
- ".github/workflows/build.yml"
- "src/**"
- "test/**"
- "util/**"
jobs:
test:
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
cache: true
cache-dependency-path: '**/packages.linux-x64.lock.json'
dotnet-version: |
8.x
10.x
- name: Build
run: dotnet build -p TreatWarningsAsErrors=true
- name: Check for BOMs
run: ./dev/check-bom.sh
- name: Check formatting
run: |
if dotnet format --no-restore --verify-no-changes; then
echo "formatting passed"
else
rc="$?"
echo "formatting failed; run 'dotnet format'" >&2
exit "$rc"
fi
- name: Unit Tests
run: dotnet test --no-build test/UnitTests/UnitTests.csproj
- name: Integration Tests
run: dotnet test --no-build test/IntegrationTests/IntegrationTests.csproj