-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (49 loc) · 1.71 KB
/
pull_request.yml
File metadata and controls
64 lines (49 loc) · 1.71 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
name: Pull Request
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Checkout
uses: actions/checkout@v4
- name: Check License Lines
uses: kt3k/license_checker@v1.0.6
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9
- name: Build
run: dotnet build Engine/Quokka.slnx --configuration Release
- name: Run tests net7
run: >
dotnet test Engine/Quokka.slnx --no-build -c Release -f net7.0 --logger "trx;LogFileName=test-results-net7.trx" || true
- name: Run tests net8
run: >
dotnet test Engine/Quokka.slnx --no-build -c Release -f net8.0 --logger "trx;LogFileName=test-results-net8.trx" || true
- name: Run tests net9
run: >
dotnet test Engine/Quokka.slnx --no-build -c Release -f net9.0 --logger "trx;LogFileName=test-results-net9.trx" --collect:"XPlat Code Coverage" --results-directory coverage || true
- name: Test report
uses: dorny/test-reporter@v1
if: always()
with:
name: .NET tests
path: "**/test-results-net*.trx"
reporter: dotnet-trx
- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/*/coverage.cobertura.xml
badge: true
format: 'markdown'
output: 'both'
fail_below_min: false
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md