updated test file #286
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
name: Fb2.Document CI | |
on: | |
push: | |
paths-ignore: | |
- "**/**.md" | |
pull_request: | |
workflow_dispatch: | |
# side-by-side build | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup .NET 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build library | |
run: dotnet build --configuration Release | |
- name: Run tests | |
run: dotnet test --no-restore --collect:"XPlat Code Coverage" | |
- name: NuGet pack | |
run: dotnet pack 'Fb2.Document/Fb2.Document.csproj' --configuration Release --no-build --no-restore --output dist | |
- name: Upload NuGet package artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.os }}-nuget | |
path: dist | |
- name: ReportGenerator | |
uses: danielpalme/[email protected] | |
with: | |
reports: "**/TestResults/**/*.xml" | |
targetdir: "coveragereport" | |
reporttypes: "Html" | |
verbosity: "Info" | |
tag: '${{ github.run_number }}_${{ github.run_id }}' | |
toolpath: "reportgeneratortool" | |
- name: Upload coverage report artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.os }}-coverageReport | |
path: coveragereport |