-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 934 Bytes
/
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
name: "Run tests"
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
name: Run tests (${{ matrix.dotnet-version }})
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
strategy:
matrix:
dotnet-version: ["net6.0", "net8.0"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
cache: true
cache-dependency-path: src/**/packages.lock.json
- run: dotnet restore --locked-mode
- name: Run tests with coverage
run: dotnet test --framework ${{ matrix.dotnet-version }} --no-restore /p:CollectCoverage=true --logger trx --results-directory "test-results"
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
comment_mode: off
files: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json