-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (50 loc) · 1.86 KB
/
Copy pathdotnet.yml
File metadata and controls
63 lines (50 loc) · 1.86 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
name: Build and Test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Initialize
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Clean project
run: dotnet clean
- name: Build
run: dotnet build -c Release --no-restore
- name: Deterministic build check
run: |
dotnet tool install --global dotnet-validate --version 0.0.1-preview.537
dotnet pack Monero/Monero.csproj -c Release /p:PackageVersion=1 --no-build -o nuget-packages
dotnet validate package local nuget-packages/MoneroNet.1.0.0.nupkg
- name: Run unit tests
run: |
dotnet tool install --global JetBrains.dotCover.CommandLineTools --version 2025.1.8
dotCover cover-dotnet \
--TargetArguments="test Monero.UnitTests/Monero.UnitTests.csproj -c Release --no-build" \
--output=coverage/dotCover.UnitTests.output.dcvr \
--filters="-:Assembly=Monero.UnitTests;-:Assembly=testhost;-:Assembly=xunit.v3.*"
- name: Run integration tests
run: docker compose -f Monero.IntegrationTests/docker-compose.yml run tests
- name: Cleanup Docker containers
if: always()
run: docker compose -f Monero.IntegrationTests/docker-compose.yml down -v
- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: coverage/dotcover.xml
- name: Upload NuGet package
uses: actions/upload-artifact@v7
with:
name: nuget-package-${{ github.sha }}
path: nuget-packages/MoneroNet.1.0.0.nupkg