forked from lqdev/markdown-ld-kb
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.65 KB
/
validation.yml
File metadata and controls
59 lines (47 loc) · 1.65 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
name: PR validation
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
env:
DOTNET_VERSION: '10.0.x'
jobs:
validate:
name: Build, test, and pack
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore MarkdownLd.Kb.slnx
- name: Verify formatting
run: dotnet format MarkdownLd.Kb.slnx --verify-no-changes --no-restore
- name: Build
run: dotnet build MarkdownLd.Kb.slnx --configuration Release --no-restore
- name: Test with coverage
run: dotnet test --solution MarkdownLd.Kb.slnx --configuration Release --verbosity normal -- --coverage --coverage-output-format cobertura --coverage-output "${{ github.workspace }}/TestResults/TUnitCoverage/coverage.cobertura.xml" --coverage-settings "${{ github.workspace }}/CodeCoverage.runsettings"
- name: Pack
run: dotnet pack MarkdownLd.Kb.slnx --configuration Release -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
- name: Upload coverage artifact
uses: actions/upload-artifact@v7
with:
name: coverage
path: TestResults/TUnitCoverage/coverage.cobertura.xml
retention-days: 5
- name: Upload package artifact
uses: actions/upload-artifact@v7
with:
name: nuget-validation-packages
path: ./artifacts/*.nupkg
retention-days: 5