-
-
Notifications
You must be signed in to change notification settings - Fork 51
105 lines (89 loc) · 3.56 KB
/
codecov.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
AppVeyorBuild: true
CoverageBuild: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-quality: preview
dotnet-version: 9.0.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup .NET 7
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.0.x
- name: Install CodeCov
working-directory: src
run: dotnet tool install --global Codecov.Tool
- name: Install Coverlet
working-directory: src
run: dotnet tool install --global coverlet.console
- name: Build FlatSharp.Compiler
working-directory: src/FlatSharp.Compiler
run: dotnet build -c Debug /p:SignAssembly=false
- name: Run FlatSharp.Compiler (E2E Tests)
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/[email protected]
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/tests/FlatsharpEndToEndTests/*.fbs) -join ";"
coverlet `
.\src\FlatSharp.Compiler\bin\Debug\net8.0 `
--skipautoprops `
--use-source-link `
--format opencover `
--target "dotnet" `
--output e2etests.coverage.xml `
--targetargs "src\FlatSharp.Compiler\bin\Debug\net8.0\FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o ."
- name: Run FlatSharp.Compiler (Stryker Tests)
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/[email protected]
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/tests/Stryker/*.fbs) -join ";"
coverlet `
.\src\FlatSharp.Compiler\bin\Debug\net8.0 `
--skipautoprops `
--use-source-link `
--format opencover `
--target "dotnet" `
--output stryker.coverage.xml `
--targetargs "src/FlatSharp.Compiler/bin/Debug/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o . --mutation-testing-mode"
- name: E2E Tests
working-directory: src
run: dotnet test Tests/FlatSharpEndToEndTests -c Debug -p:SignAssembly=false --collect:"XPlat Code Coverage" --settings Tests/coverlet.runsettings -f net9.0
- name: Compiler Tests
working-directory: src
run: dotnet test Tests/FlatSharpCompilerTests -c Debug -p:SignAssembly=false --collect:"XPlat Code Coverage" --settings Tests/coverlet.runsettings -f net9.0
- name: Stryker Tests
working-directory: src
run: dotnet test Tests/Stryker/Tests -c Debug -p:SignAssembly=false --collect:"XPlat Code Coverage" --settings Tests/coverlet.runsettings -f net9.0
- name: Upload
run: codecov -f **/*coverage*.xml