Skip to content

Merge branch 'feature/mudblazor-8' into dev #140

Merge branch 'feature/mudblazor-8' into dev

Merge branch 'feature/mudblazor-8' into dev #140

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: Install .NET 9
run: |
wget -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --version 9.0.101 --install-dir /usr/share/dotnet
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet
- 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": "9.0.101"}}' > ./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