-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 2.13 KB
/
core-test.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
63
64
65
name: Arius.Core - Test Suites
on:
# Runs on every push to Arius.Core
push:
paths:
- 'src/Arius.Core/**'
- 'src/Arius.Core.BehaviorTests/**'
- 'src/Arius.Core.Tests/**'
- '.github/workflows/core-test.yml'
jobs:
test:
name: Run Test Suite on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
defaults:
run:
working-directory: ./src
steps:
- name: Check out code
uses: actions/checkout@v4
# with:
# submodules: true # Check out WouterVanRanst.Utils
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
# Cache NuGet packages
# NOTE: with the --filter, we exclude a unit test that is looking for openssl and gzip - this takes too long on windows
- name: Cache .NET packages
uses: actions/cache@v4
with:
path: |
~/.nuget/packages
!~/.nuget/packages/**/project.assets.json
!~/.nuget/packages/**/project.nuget.cache
key: ${{ runner.os }}-dotnet-${{ hashFiles('**/Arius.Core.csproj') }}
restore-keys: |
${{ runner.os }}-dotnet-
- name: Test
run: |
dotnet test Arius.Core.BehaviorTests /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet test Arius.Core.Tests /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --filter FullyQualifiedName!=Arius.Core.Tests.UnitTests.CryptoTests.DecryptWithOpenSsl_File_Equal
env:
ARIUS_ACCOUNT_NAME: ariusci
ARIUS_ACCOUNT_KEY: ${{ secrets.ARIUS_ACCOUNT_KEY }}
- name: Merge and Convert Coverage Reports
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool
reportgenerator "-reports:./Arius.Core.BehaviorTests/coverage.opencover.xml;./Arius.Core.Tests/coverage.opencover.xml" "-targetdir:." -reporttypes:Cobertura
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: |
Cobertura.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}