-
Notifications
You must be signed in to change notification settings - Fork 34
49 lines (39 loc) · 1.54 KB
/
build-test-mudcalendar.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
name: build-test-mudcalendar
on:
workflow_dispatch:
push:
branches: [ dev ]
jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '8.0.x', '9.0.x' ]
steps:
- name: Checkout MudCalendar repository
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
id: stepid
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Create temporary global.json
run: |
echo '{"sdk":{"version": "${{ steps.stepid.outputs.dotnet-version }}"}}' > ./global.json
- name: Restore
run: dotnet restore Heron.MudCalendarWithDocs.sln
- name: Build
run: dotnet build -c Release -m:1 --no-restore
working-directory: ./Heron.MudCalendar
- name: Build
run: dotnet build -c Release -m:1 --no-restore
working-directory: ./Heron.MudCalendar.UnitTests
- name: Test
run: dotnet test -c Release --no-build --no-restore --blame-hang --blame-hang-timeout 60s /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByAttribute='ExcludeFromCodeCoverageAttribute' /p:Include='[Heron.MudCalendar]*' /p:CoverletOutput='./TestResults/' --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
working-directory: ./Heron.MudCalendar.UnitTests
- name: Publish coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.cobertura.xml