forked from QuestPDF/QuestPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.28 KB
/
pull-request.yaml
File metadata and controls
50 lines (41 loc) · 1.28 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
name: Pull Request
on:
pull_request:
branches:
- main
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: src/global.json
- name: Restore dependencies
run: dotnet restore src/ShinyPDF.slnx
- name: Build
run: dotnet build src/ShinyPDF.slnx --configuration Release --no-restore
- name: Run unit tests
run: |
dotnet test \
src/ShinyPDF.UnitTests/ShinyPDF.UnitTests.csproj \
--configuration Release \
--no-build \
--results-directory src/ShinyPDF.UnitTests/TestResults \
--verbosity normal \
--logger "trx;LogFileName=test-results.trx"
- name: Parse and report test results
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository }}
uses: dorny/test-reporter@v3
with:
name: Unit Test Results
path: 'src/ShinyPDF.UnitTests/TestResults/test-results.trx'
reporter: 'dotnet-trx'
fail-on-error: false