Skip to content

ReFlex Library: Build & Test #37

ReFlex Library: Build & Test

ReFlex Library: Build & Test #37

Workflow file for this run

name: "ReFlex Library: Build & Test"
on:
# make this workflow reusable
workflow_dispatch:
workflow_call:
outputs:
artifact_name:
description: "name of the artifact that has been uploaded"
value: ${{ jobs.test-library.outputs.artifact_name }}
jobs:
test-library:
runs-on: windows-latest
name: build and test .NET library
env:
artifact_name: .NET Test Report (ReFlex Library)
outputs:
artifact_name: ${{ env.artifact_name }}
steps:
- name: checkout repo with submodules
uses: actions/checkout@main
- name: setup .NET and restore nuget packages
uses: ./.github/actions/net-install
- name: Install Required Tools
run: |
dotnet new tool-manifest --force
dotnet tool install dotnet-reportgenerator-globaltool
- name: execute tests and with code coverage
run: dotnet test --collect:"XPlat Code Coverage" --results-directory:${{ github.workspace }}/test/artifacts/coverage-net/cobertura/
- name: generate report
run: dotnet reportgenerator -reports:"${{ github.workspace }}/test/artifacts/coverage-net/cobertura/**/coverage.cobertura.xml" -targetdir:"${{ github.workspace }}/test/artifacts/coverage-net/report" -reporttypes:"Html_Light;HtmlSummary;Cobertura;XML;XMLSummary;JsonSummary;MarkdownSummaryGithub;Badges" -title:"ReFlex - Library" -assemblyfilters:"+ReFlex.*;-*.Test"
- name: Attach Report as Build Artifact
uses: actions/upload-artifact@main
with:
name: ${{ env.artifact_name }}
path: ${{ github.workspace }}/test/artifacts/coverage-net/report