-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 2 KB
/
ci.yml
File metadata and controls
71 lines (59 loc) · 2 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
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
build-and-test:
name: build & test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
dotnet-quality: preview
- name: Restore
run: dotnet restore Loom.sln
- name: Verify formatting
run: dotnet format Loom.sln --verify-no-changes --severity error
- name: Build
run: dotnet build Loom.sln --configuration Release --no-restore /p:TreatWarningsAsErrors=true
- name: Test (domain — fast, no I/O)
run: |
dotnet test tests/Loom.Domain.Tests/Loom.Domain.Tests.csproj \
--configuration Release \
--no-build \
--logger "trx;LogFileName=domain-tests.trx" \
--results-directory ${{ github.workspace }}/TestResults
- name: Test (infrastructure — Testcontainers / MSSQL)
run: |
dotnet test tests/Loom.Infrastructure.Tests/Loom.Infrastructure.Tests.csproj \
--configuration Release \
--no-build \
--logger "trx;LogFileName=infrastructure-tests.trx" \
--results-directory ${{ github.workspace }}/TestResults
- name: Test (web — host smoke)
run: |
dotnet test tests/Loom.Web.Tests/Loom.Web.Tests.csproj \
--configuration Release \
--no-build \
--logger "trx;LogFileName=web-tests.trx" \
--results-directory ${{ github.workspace }}/TestResults
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results
path: ${{ github.workspace }}/TestResults
retention-days: 14